#: 12642 S3/Languages
19-Oct-91 22:52:05
Sb: #12640-#Basic/Term Libaries
Fm: Bob van der Poel 76510,2203
To: SCOTT HOWELL 70270,641 (X)
The DIM statement reserves variable space only as long as the particular
procedure is active. If you DIM WOOF:INTEGER in proc1 the storage will stay
around when you call proc2. However, in proc2 all the variables will disappear
after you return to proc1. This creates some problems (yes, you can work around
them) when a 'subroutine' like termcap i/o needs to initialize a bunch of stuff
early on and then access it later. What you typically do is to have the basic
startup code pass a variable where the stuff can be stored. Then you have to
pass that variable around to all the other procs so that if you need to call
the termcap stuff it will know where the data is. One other way around this is
to have the termcap functions save its stuff in a data module. I've been
thinking about this while raking leaves--might just give a go myself and see
what comes out. I think that if folks could access termcap from Basic you might
see more quickie utils, etc. written. The only thing I have to resolve in my
own mind is what output routine to use (should termcap assume stdout, or should
basic pass it a path, or perhaps have termcap call back to basic?? gotta rake
some more leaves for this one).
Hold on to your VED for a few more days. I'm sending out a letter (hopefully by
the end of next week) with a new upgrade announcement (1.3) as well as special
deal on a product. Don't know if the bug you mentioned is a version 1.0 thing
or termcap. If the cursor _actually_ goes back to the top of file then I
suspect a bug (even though it works fine here), if it just gets positioned
wrong I'd have a look at the termcap entry.
There is 1 Reply.
|