Qbasicnews.com
May 12, 2021, 12:08:11 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Passing and REturning arrays in FB  (Read 1931 times)
matt2jones
Senior Member
**
Posts: 157



« on: July 21, 2005, 08:32:03 AM »

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
Logged

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
DrV
Na_th_an
*****
Posts: 1553



WWW
« Reply #1 on: July 21, 2005, 09:44:14 AM »

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
Logged
matt2jones
Senior Member
**
Posts: 157



« Reply #2 on: July 21, 2005, 04:12:10 PM »

Short, okay, thats what I need, thanks.

m2j
Logged

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
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!