Neobook Tip – Ascii Chars – Naming Them For Readable Code

Contributed by Sam Cox:

Sometimes when using special characters in NeoBook, looking at all those hash marks (#) or little ASCII characters (such as a period) can drive you nuts. As suggested by Gaev in the NeoBook Forum, you can assign names (and therefore meaning) to all of those characters and, by doing so, make your code easier to read.

Here is the named set of special characters that I use routinely. You can, of course, assign your own names and add the characters you use to this list.

CODE

..Convenient ASCII characters and character sequences
..Put this code in BookProperties:Actions:Startup
SetVar "[Null]" "[#0]"
SetVar "[BS]" "[#8]"
SetVar "[Tab]" "[#9]"
SetVar "[LF]" "[#10]"
SetVar "[FF]" "[#12]"
SetVar "[CR]" "[#13]"
SetVar "[Space]" "[#32]"
SetVar "[DQ]" "[#34]"
SetVar "[SQ]" "[#39]"
SetVar "[LB]" "[#91]"
SetVar "[RB]" "[#93]"
SetVar "[Pipe]" "[#124]"
SetVar "[CRLF]" "[CR][LF]"
SetVar "[NL]" "[CRLF"]
SetVar "[Comma]" ","
SetVar "[Period]" "."
SetVar "[Colon]" ":"
SetVar "[SemiColon]" ";"

———————————————
What is Neobook?

Simply put, it is a programming environment that allows you to create, compile and distribute royalty free applications of any kind. From beginners to advanced programmers, NeoBook RAD5 Pro has something for everybody. Try it free!

More Info

Download 30 day free trial
Buy Now for 10% off





Leave a Reply