How and when would you use the CHAR structure? I've seen the CHAR used in C++ code, is this the same thing?
Some useful macros ?
Hi technicorn,
... wouldn't a pointer be dependent on the compiler version? So if there will be a 64bit version of the compiler this would be "automatically" in the appropriate size.
If I change this code to:technicorn wrote:Code: Select all
Structure ADDRARRAY a.l[0] ; We might get quad memory addresses with PB5 ?! ;) EndStructure
Code: Select all
Structure ADDRARRAY
*a[0]
EndStructureRight after the Ubound macro was published I put it to good use into a RES file.
Last weekend I searched for a bug in LCP that only occured on translating a lot of class definitions in one project.
After changing the Ubound value with a fixed integer the bug disappeared.
Don't know if it's the macro itself or how the PureBasic compiler acts after the extensive use of a macro.
Is this the reason why there is no official UBound in the PureBasic language

Last weekend I searched for a bug in LCP that only occured on translating a lot of class definitions in one project.
After changing the Ubound value with a fixed integer the bug disappeared.
Don't know if it's the macro itself or how the PureBasic compiler acts after the extensive use of a macro.
Is this the reason why there is no official UBound in the PureBasic language
Last edited by fsw on Mon Aug 21, 2006 3:56 pm, edited 1 time in total.
Re: Some usefull? Macros
Never got a straight answer.fsw wrote:Can somebody from the PB dev team tell me if this is the right approach and will it always work?technicorn wrote:Code: Select all
Macro Ubound(array) (PeekL(@array - 8) - 1) EndMacro
And if this command will be native in the future.
Now would be a good time.

