--


RE: Skeleton Subs are Useless?

by (no login)

 

Well you've gotta admit that subs which you cannot pass a value to or share any data with are of very little use. Although it is tempting to waste my time writing a "fun?" program that passes data via an open file handle just for kicks ;)

"But I do not understand; if you are just porting QB code to C*, why do you need to manually handle memory allocation for Subs?"
That's a good question. Actually passing most data to subs is a very easy process, especially simple variables which are passed by their offset, an this is done in the standard C method. QB arrays are far more complex "beasts" which if defined within the sub need to be allocated and freed using other means.

The main reason I'm making slow program on this is because I'm focusing on something else for QB64 atm.





Posted on Feb 5, 2008, 1:35 AM

Respond to this message   

Return to Index

Response TitleAuthor and Date
* Shouldn't you pass the arrays Byref with pointers instead of duplicating them? ;-)OLPC on Feb 5
 *I should, and I do. on Feb 6
  Re: *I should, and I do.LaananFisher on Feb 6
   QB 7.1 has a BYVAL statement, maybe QB64 could use thatqbguy on Feb 6
   RE: Actually a feature that I've always wanted is to be able to pass arrays byref or byval on Feb 6
    Re: RE: Actually a feature that I've always wanted is to be able to pass arrays byref or byvalLaananFisher on Feb 7
     Since it is being programmed in C/C++, =>rpgfan3233 on Feb 7

 Copyright © 1999-2008 Network54. All rights reserved.   Terms of Use   Privacy Statement