hello.
This may be a stuppid question but why does the syntax
PrintN("#: "+TR) shows on the screen, or console; #: N where N is a designated value or zero if uninitialized
but the syntax
PrintN(TR) gives a syntax error
Syntax Issue
Re: Syntax Issue
PrintN("#: "+TR) is a short version of: PrintN("#: "+Str(TR))
PrintN() needs a string, so you have to use a string
PrintN() needs a string, so you have to use a string
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Re: Syntax Issue
To expound on what Stargate said, once you start using a string, if you "add" a number to it, the Str() is implied...or the number type is converted to a string type, or any other variety of ways you can say "done for you".
If you are really worried about keystroke efficiency, you can even type this:
Print(""+TR)
instead of
Print(str(TR))
...saves you two whole keystrokes!
If you are really worried about keystroke efficiency, you can even type this:
Print(""+TR)
instead of
Print(str(TR))
...saves you two whole keystrokes!