expand As

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
gurj
Enthusiast
Enthusiast
Posts: 693
Joined: Thu Jan 22, 2009 3:48 am
Location: china
Contact:

expand As

Post by gurj »

expand As
Example:

Code: Select all

a=3
For n=0 To 99
 b=Random(3)
 If b=a:a As b:Break
 EndIf
 Next
 a=12
 Debug b;=12
 b=4
 Debug a;=4
my pb for chinese:
http://ataorj.ys168.com
User avatar
Keya
Addict
Addict
Posts: 1890
Joined: Thu Jun 04, 2015 7:10 am

Re: expand As

Post by Keya »

could you describe in more detail what you mean?
your code only makes sense to me when i remove the "a As b" to become "If b=a: Break: EndIf", so call me stupid but I can't actually see what "a As b" is meant to do!? Im guessing its not a typecast.
User avatar
gurj
Enthusiast
Enthusiast
Posts: 693
Joined: Thu Jan 22, 2009 3:48 am
Location: china
Contact:

Re: expand As

Post by gurj »

sorry,is a hope

another name relatively,a and b by As
my pb for chinese:
http://ataorj.ys168.com
User avatar
Demivec
Addict
Addict
Posts: 4260
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: expand As

Post by Demivec »

@:Keya: I think he means a type of aliasing or an equivalence of some sort.
Post Reply