New Key Words?
Posted: Sat Sep 11, 2004 12:21 pm
Hi,
I'm a beginner with PureBasic so may have overlooked the obvious, please excuse!
1. It would be good to have INC and DEC to increment/decrement a variable.
INC MyVariableName
is neater than:
MyVariableName = MyVariableName + 1
etc
2. SWAP(variable1, variable2)
This makes life so much quicker when writing sorting routines that involve multiple arrays
v.l = Sernum.l(n.w) : Sernum.l(n.w) = Sernum.l(n.w+1) : Sernum.l(n.w+1)=v.l
becomes
SWAP(Sernum.l(n.w) ,Sernum.l(n.w+1)
Should work with all variable types.
3. ARRAYFILL Arrayname(),Value
Great for initialising / clearing.
4. MID(String$,Posn,Limit) = Item$
Insertion is a neat way to build/modify strings.
I have acheived the function of all these suggestions by other means, but PB would be better with them.
Also, BMOVE, MEMBFILL would be nice...
My previous BASIC was 16bit GFA, so these are the things I miss when migrating programs to PB.
Apart from the standard editor, I'm acheiving results with PB... thats what counts.
jaBPe is an improvement
RichardL
I'm a beginner with PureBasic so may have overlooked the obvious, please excuse!
1. It would be good to have INC and DEC to increment/decrement a variable.
INC MyVariableName
is neater than:
MyVariableName = MyVariableName + 1
etc
2. SWAP(variable1, variable2)
This makes life so much quicker when writing sorting routines that involve multiple arrays
v.l = Sernum.l(n.w) : Sernum.l(n.w) = Sernum.l(n.w+1) : Sernum.l(n.w+1)=v.l
becomes
SWAP(Sernum.l(n.w) ,Sernum.l(n.w+1)
Should work with all variable types.
3. ARRAYFILL Arrayname(),Value
Great for initialising / clearing.
4. MID(String$,Posn,Limit) = Item$
Insertion is a neat way to build/modify strings.
I have acheived the function of all these suggestions by other means, but PB would be better with them.
Also, BMOVE, MEMBFILL would be nice...
My previous BASIC was 16bit GFA, so these are the things I miss when migrating programs to PB.
Apart from the standard editor, I'm acheiving results with PB... thats what counts.
jaBPe is an improvement
RichardL