Just to reiterate a past wish by myself and several other board
members. I recently had to use two other flavors of BASIC and
they both allowed variable length strings in TYPE structures. I
had forgotten just how great that feature is. It certainly makes
coding a lot cleaner (at least in most of the applications that I
write).
I currently use variable length strings in TYPE's via some wrapper
routines that manually allocate and deallocate memory. It works,
but it is not a 'BASIC' way of doing things. It would be a lot
cleaner if the compiler took care of allocating the memory space
and destroying it whenever the TYPE variable went out of scope (much
like all other variables).
... oh, and I know the argument about TYPE's needing to be fixed
length in order to be better suited for files opened in random
mode, but that it just one specific case of a use for TYPE variables.
I use them much, much, more often to hold in-memory program data.
Also, while we're at it, why not build into the language two keywords
that allow for the manual allocation and deallocation of memory.
For example, MEMALLOCATE and MEMDEALLOCATE. I currently use wrappers
around the Win API functions to do this but it seems that it should
be part of the PB language itself (hell, we have pointers and in-line
asm, so allowing the programmer to allocate and deallocate memory
is not that big of a step).
... just thought that I would get a couple of shots in before the
end of 2005.
------------------
Paul Squires
FireFly Visual Designer, Cheetah Database System, JellyFish Pro Editor
www.planetsquires.com
[This message has been edited by Paul Squires (edited December 29, 2005).]
members. I recently had to use two other flavors of BASIC and
they both allowed variable length strings in TYPE structures. I
had forgotten just how great that feature is. It certainly makes
coding a lot cleaner (at least in most of the applications that I
write).
I currently use variable length strings in TYPE's via some wrapper
routines that manually allocate and deallocate memory. It works,
but it is not a 'BASIC' way of doing things. It would be a lot
cleaner if the compiler took care of allocating the memory space
and destroying it whenever the TYPE variable went out of scope (much
like all other variables).
... oh, and I know the argument about TYPE's needing to be fixed
length in order to be better suited for files opened in random
mode, but that it just one specific case of a use for TYPE variables.
I use them much, much, more often to hold in-memory program data.
Also, while we're at it, why not build into the language two keywords
that allow for the manual allocation and deallocation of memory.
For example, MEMALLOCATE and MEMDEALLOCATE. I currently use wrappers
around the Win API functions to do this but it seems that it should
be part of the PB language itself (hell, we have pointers and in-line
asm, so allowing the programmer to allocate and deallocate memory
is not that big of a step).
... just thought that I would get a couple of shots in before the
end of 2005.

------------------
Paul Squires
FireFly Visual Designer, Cheetah Database System, JellyFish Pro Editor
www.planetsquires.com
[This message has been edited by Paul Squires (edited December 29, 2005).]
Comment