Wierd functions

Hello everybody!
When I have been playing about in the arduino IDE, I have mannaged to
find some functions that are not mensioned anywhere. I have found 'try'
to be a finction, as well as 'speed'. To find out more information, the first
place I checked was the referance page. There was nothing there. Next, I
looked in the reference section in the software download for some info.
Still, there was no information. With the knowledge that arduino is based
on wiring, I looked on their website. Even in their reference section, there
was still no details.
More functions that seem to appear in the IDE but not reference (altough I have
only
checked on the internet version, nowhere else), are 'get', 'stop', 'version' and 'new'.

Although it is easy to guess what they do, I have no idea how to add them
into a code, and, more importantly, where they came from. This is just a
matter of interest, but if anyone knows anything about them, I shall be interested.

Thanks, Onions.

More functions that seem to appear in the IDE

What do you mean by "appear in the IDE"?

The arduino language has the whole of the C language behind it. Not all of this is mentioned on the reference page. Any good book on C will reveal lots more.

oh boy, maybe easter eggs?

easy to guess what they do

Guessing is one thing; doing is quite another.

Just because certain words are highlighted when you type them into the IDE editor window, that doesn't mean they actually do anything when used in a sketch. (A sketch gets embedded in a C++ program and compiled by avr-gcc).

I'm guessing (and it really is just a guess) that some of these words you discovered (cleverly hidden somewhere in the Arduino distribution) were copied from the Processing language source tree keywords.txt into Arduino by some developer, and some of the things should have been left out. For example, avr-gcc does not support the C++ "new" operator, so trying to use it in an Arduino sketch won't work. The avr-gcc compiler also does not support C++ exceptions, so "try" and "throw" can't do anything for C++ programmers either.

Bottom line:
Poking around for Easter Eggs can be fun and, sometimes, pedagogically nutritional, but I would take them with a grain of salt and not worry to much about whether they are a solution looking for a problem (or not). But that's just me. I'm funny that way...

Regards,

Dave

Footnote:
FYI: As for the title (Wierd functions) that you gave the thread: Weird is one of those weird words where 'I' does not come before 'E', even though it's not after 'C' Anyhow, if you think things are weird just because something in the implementation doesn't agree with the documentation (or vice versa), or you think it's weird to discover something is missing from the documentation, you will have a lot of weird experiences as you are exposed to more and more things in the Wonderful World of Everything.

@onions:
Check this site - AVR Libc Home Page - for some more inspiration

Check these website for the more inspiration about the Wierd programming language:

http://codinginparadise.org/weblog/2009/03/wierd-programming-language.html
http://www.wordiq.com/definition/Wierd_programming_language

Thought to be Turing-complete.

Hello again!

What do you mean by "appear in the IDE"?

By that, I mean they are highlighted in orange in the IDE.

Just because certain words are highlighted when you type them into the IDE editor window, that doesn't mean they actually do anything

That explains alot! So altough they are highlighted, they do not
do anything!
:slight_smile:

Check these website for the more inspiration about the Wierd programming language:
Languages | Cat's Eye Technologies
Coding In Paradise: The "Wierd" Programming Language
http://www.wordiq.com/definition/Wierd_programming_language

That looks like such a cool language! It has made my day reading about it. :smiley: