Post by Tom Mulgrew on Jan 13, 2008 6:10:23 GMT -5
Just so you know, the "official" (whatever that means) v2.5.0 release of Basic4GL is up on the main site. www.basic4gl.net
I've fixed the memory leak that occurs when strings are passed to/from functions and subroutines. Otherwise it should be functionally exactly the same as the v2.5.0 beta that I put up a week or so ago.
In case you missed the discussion, this is finally the release that has proper function and subroutine support, which a lot of people (myself included) have been waiting a long time for.
PS. If anyone has some time to kill, taking a Basic4GL example program, converting it to use functions/subs instead of GOSUB/RETURN and emailing me the result would be very helpful (currently there are no distributed examples that use functions and subs).
It'll be nice to be able to put my collision detection into functions now rather than writing the right code for every time I need it. I guess now I have to spend some time re-writing some of my code to incorporate that, but oh well.
Post by Pizzasgood on Jan 14, 2008 19:09:34 GMT -5
Good stuff. Now if only you could upload several weeks worth of free time for me to download, so I could get caught up on everything long enough to give it a try
But really, the lack of functions was one of the main things deterring me from messing around with b4gl since learning C++, so I'm several times more likely to come back and play around some more now. I need a good break from Linux hacking anyways. Just need to finish my commitments first, and try not to make new ones (I'm really bad about that...)
"I have a tendency to wear my mind on my sleeve / I have a history of losing my shirt"--Barenaked Ladies Currently running: Puppy 4.2.1
Looks great Tom! I started playing with them a little while ago and I'm having fun. Exactly what Basic4GL needed. I noticed a couple of small issues, it doesn't seem to be handling allocated data (which was one of the neat things I was looking forward to using function for). Here are a few examples:
I was going to make a simple expression tree, but it tells me there's an unset pointer when it reaches the second call to "newNode". When you use "&variable" is it passing by reference? How can you pass a pointer to a pointer?
struc Node dim type$ dim value dim Node &left dim Node &right endstruc
sub newNode(Node &n, type$, value) alloc n n.type$ = type$ n.value = value endsub