What is the point of this code?
I want to point out that I looked for a pinned note of FAQ questions first (which I didn't find; feel free to point it out), and second, I did a search, but the bit that I have a question about is in SO many posts, that search didn't help.
So here is my question...
All the example programs in my books (Toddler and SumoBot) start with the following...
' {$STAMP BS2}
' {$PBASIC 2.5}
To me, it seems this code is commented out, and thus is only for the reference of anyone who might look at the code. So why is it always formatted the way it is and not something like...
' Stamp BS2, PBASIC 2.5
Does this not accomplish the same thing? I suspect having it in the 'standard' format means something, but I don't know what.
Educate me, please.
So here is my question...
All the example programs in my books (Toddler and SumoBot) start with the following...
' {$STAMP BS2}
' {$PBASIC 2.5}
To me, it seems this code is commented out, and thus is only for the reference of anyone who might look at the code. So why is it always formatted the way it is and not something like...
' Stamp BS2, PBASIC 2.5
Does this not accomplish the same thing? I suspect having it in the 'standard' format means something, but I don't know what.
Educate me, please.
Comments
In this case, the first directive tells the compiler to use Pbasic 2.5 (rather than 2.0). The second directive tells the compiler which flavor Stamp the program applies to.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php
Take a look in the upper left hand corner at "Directives".(In the editor window) Click on it and You'll see the drop down windows. This selection will paste the Directives for You. It saves a little typing at the start of a new project.
_____________$WMc%______
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Truth is out there············································ BoogerWoods, FL. USA
Typing the code as you suggested: ' Stamp BS2, PBASIC 2.5 makes the code only a comment and does will not allow for the command/format properties to be utilized. It has to be in the format
' {$STAMP BS2}
' {$PBASIC 2.5}
Hope this helps!