#: 12797 S12/OS9/68000 (OSK)
01-Nov-91 19:27:00
Sb: #Termcap and Basic
Fm: Bob van der Poel 76510,2203
To: all
Has any thought been given to termcap usage with Basic programs? I can see lots
of new OSK folks writing neat little things with Basic and, because there is no
termcap for Basic, ending up hardcoding display codes--and that would be a real
shame. I've given the subject a fair amount of thought and I really don't see a
easy way to use termcap from Basic (mainly because of a lack of static and
global storage--I could give more on this if there is interest), besides, a lot
of the things people will be doing will involve window codes, etc. which
termcap doesn't support. So, as an alternative, I suggest that standard
interfaces be set up. Each one of these would be written for a specific
terminal, but they would all expect the same params (and they'd be Basic
procedures, even though they need not be written in Basic). For K-windows we
might have a module called "basic_kcurses", for vt100 "basic_vtcurses", etc.
Before doing any terminal output the program could decide which interface to
use (perhaps from the TERM shell variable) and then pass this name around to
the routines which need it. To set the cursor you'd do something like "RUN
GFXPROC(path,"gotoxy",x,y)". GFXPROC would be a variable which could be
"basic_kcurses" or whatever. This is just a suggestion! But we better get
together and set some "standards". Also, I'd appreciate it if someone would
start similar threads on other services--that way everyone will have a change
to become involved.
There is 1 Reply.
|