PBASIC 2.5 command suggestion
James Anderson
Posts: 52
Hello,
is there a command in pbasic that is short hand for the instruction
variablexyz = variablexyz * 2
any suggestions appreciated...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There once was a lady named Bright
who traveled much faster than light
She departed one day in a relative way
and Returned on the Previous Night
Cheers,
Wannabe Ub3r Geek
World of Warcraft
Star Trek official website
Google (Man's best friend...)
is there a command in pbasic that is short hand for the instruction
variablexyz = variablexyz * 2
any suggestions appreciated...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There once was a lady named Bright
who traveled much faster than light
She departed one day in a relative way
and Returned on the Previous Night
Cheers,
Wannabe Ub3r Geek
World of Warcraft
Star Trek official website
Google (Man's best friend...)
Comments
There's not really anything shorter. SPIN (for the Propellor) does have a short hand like in "C",
but PBasic does not have this short hand. SPIN lets you write: variablexyz <<= 1 or variablexyz *= 2.
The two statements in PBasic are pretty much the same in execution speed. The interpreter overhead
washes out any differences between the operators.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There once was a lady named Bright
who traveled much faster than light
She departed one day in a relative way
and Returned on the Previous Night
Cheers,
Wannabe Ub3r Geek
World of Warcraft
Star Trek official website
Google (Man's best friend...)