Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Passing and REturning arrays in FB
#1
okay, I'm almost, and I mean so close its not funny, to releasing an FB port of an old QB minirpg. I wrote it in DQB, so I just made an include to pass over every dqb call to standard FB graphic calls, but I'm having a problem with DQBPut.

Is it possible to return Arrays from functions in FB, and if so, how is that done?

And while I'm at it can you pass arrays to subs in FB... I think you could in QB but I never needed to try.

And failing that, is there a 'word' (2 byte integer like qb has) data type in FB?

I have no documentation....

matt
o not mistake Apathy for Feeling content...

http://www.disjointed.cjb.net - Short Stories
http://matt2jones.deviantart.com - Random Art
http://www.freewebs.com/matt2jones - WebComic
Reply
#2
Documentation

It isn't possible to return an array from a function (yet); you can use pointers to simulate this.

You can pass arrays to subs:
Code:
Dim xyz(5) as integer
sub use_array(this_array() as integer)
' do stuff with this_array()
end sub

use_array xyz()

2-byte integer datatype = short
Reply
#3
Short, okay, thats what I need, thanks.

m2j
o not mistake Apathy for Feeling content...

http://www.disjointed.cjb.net - Short Stories
http://matt2jones.deviantart.com - Random Art
http://www.freewebs.com/matt2jones - WebComic
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)