Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Convert Dword
#1
How would you convert this PowerBasic code to freebasic


Local Size as Dword
Size = MAKDWD(x, y)

Thanks for any help
Reply
#2
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 )
Reply
#3
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.'
Reply
#4
Quote:Also, how is pointer math coming? ie: *(foo+bar) = something
From the 0.11b Changelog.txt:
Code:
[added] "*([@]variable +|- expression)" and "*@variable" support (v1c)
[added] pointer indexing support, as in "myptr[idx]" (v1c)
Reply
#5
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.'
Reply
#6
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]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)