03-06-2005, 10:19 AM
How would you convert this PowerBasic code to freebasic
Local Size as Dword
Size = MAKDWD(x, y)
Thanks for any help
Local Size as Dword
Size = MAKDWD(x, y)
Thanks for any help
Convert Dword
|
03-06-2005, 10:19 AM
How would you convert this PowerBasic code to freebasic
Local Size as Dword Size = MAKDWD(x, y) Thanks for any help
03-06-2005, 11:17 AM
With macros in 0.12, you can do like:
#define MAKDWD(x,y) (cint(x) shl 16 or cint(y)) dim size as uinteger ' or unsigned integer size = MAKDWD( x, y )
ew FreeBASIC forums: http://www.freebasic.net/forum/index.php
03-06-2005, 08:20 PM
Can we do variable arguements and multi-line macros too?
Also, how is pointer math coming? ie: *(foo+bar) = something
Life is like a box of chocolates', hrm, WTF, no it isn't, more like, 'life is like a steaming pile of horse crap.'
03-06-2005, 09:37 PM
Quote:Also, how is pointer math coming? ie: *(foo+bar) = somethingFrom the 0.11b Changelog.txt: Code: [added] "*([@]variable +|- expression)" and "*@variable" support (v1c)
03-06-2005, 09:41 PM
That doesn't help when adding two (or more) unrelated pointers together.
Life is like a box of chocolates', hrm, WTF, no it isn't, more like, 'life is like a steaming pile of horse crap.'
03-07-2005, 10:05 PM
Quote:That doesn't help when adding two (or more) unrelated pointers together. That makes no sense. Say you have ptr1 = 100 and ptr2 = 200, both added = 300, that points to?? Neverland? :P Try that in GCC and it will die with the "invalid operands to binary +" error.[/quote]
ew FreeBASIC forums: http://www.freebasic.net/forum/index.php
|
« Next Oldest | Next Newest »
|