Hi ^_^
I noticed that somebody had a problem resulting from a confusion of name.s with name$
They both seem to do the same thing in the same way - store a string.
So, why are there two forms of the same thing?
What distinguishes one from the other (apart from the name) ?
This might be important, after all ...
^@@^
What distinguishes name$ from name.s ?
The .s thing was there first. The $ was implemented because it is more
'basic' style. .s fits more with PB's type declaration, so I think it's good to
have them both.
If you use $, you always have to append the $ to the variable, which is
why I prefer the .s thing, because it saves me some typing
However some people prefer $ because this way they always see, which
one is a string variable and which is not.
Internally, they are both the same, you just can't mix them. Once you
define a string with $, you ALWAYS need to append it.
Timo
'basic' style. .s fits more with PB's type declaration, so I think it's good to
have them both.
If you use $, you always have to append the $ to the variable, which is
why I prefer the .s thing, because it saves me some typing
However some people prefer $ because this way they always see, which
one is a string variable and which is not.
Internally, they are both the same, you just can't mix them. Once you
define a string with $, you ALWAYS need to append it.
Timo
quidquid Latine dictum sit altum videtur
Thanks, Freak.
So once you have defined say, num.l, you can go on using num ?
Cool
So once you have defined say, num.l, you can go on using num ?
Code: Select all
Global floating.f, longnum.l, byte.b, name.s
; so I can use ...
floating=14.0093
longnum=39578566376
bite=251
name="Baron Frankenstein"
; for the rest of the program?
btw.
this work:
this not:
GPI
Code: Select all
name.s="hallo"
name$="Bye"
debug name
debug name$
Code: Select all
name$="Hallo"
name=10
Code: Select all
name.s="hallo"
name=10
only this:
(see all example as new source-codes!)
What i want to say:
Name$
is not
Name.S / Name.W / Name.B / Name.l
There are two diffrent variables!
(see all example as new source-codes!)
Code: Select all
name.s="hallo"
name=10
Name$
is not
Name.S / Name.W / Name.B / Name.l
There are two diffrent variables!


