Typing a variable as an Integer is something we have chatted about before.
Basic4ppc is ingenious in the way it parses the code so it can run through the Micro$oft C compiler, but it stores all vars as strings which get converted if they are numbers;
So anything like c=c+1 involves transformations from variable held as string into number then back again!
In speed critical routines Ive used c(0)=c(0)+1 because you can type arrays as integers
In version 6.4 can we have a neater way to do simple typing. My suggestion would be that any var ending in the percent sign is stored as a Double and then the conversion routines can be omitted by the parser.
e;g; c%=c%+1
This will give faster, more compact code and fits with Basic conventions that % represents a numerical variable.
p.s; Basic4ppc is great - this addition will make it near perfect! lol!
Basic4ppc is ingenious in the way it parses the code so it can run through the Micro$oft C compiler, but it stores all vars as strings which get converted if they are numbers;
So anything like c=c+1 involves transformations from variable held as string into number then back again!
In speed critical routines Ive used c(0)=c(0)+1 because you can type arrays as integers
In version 6.4 can we have a neater way to do simple typing. My suggestion would be that any var ending in the percent sign is stored as a Double and then the conversion routines can be omitted by the parser.
e;g; c%=c%+1
This will give faster, more compact code and fits with Basic conventions that % represents a numerical variable.
p.s; Basic4ppc is great - this addition will make it near perfect! lol!
Last edited: