Rich Mellor writes:

>> Yes, I've 2 small basic procedures just for that, too - the first one
>> reads
>> the defauts, stores them and sets them to "" and the seconed later resets
>> them to what they were. (And yes, I know that this is fraught with
>> danger if
>> the first one gets called twice by successive progs before the default is
>> reset).
>>
>> I even once perused the relevant OS source files to see whether one
>> couldn't
>> get rid of the functions using the system defaults, but that would be
>> quite
>> some work...
>>
>
> This brings us back around to what was mooted a few years ago - the
> possibility of having local default devices for each program..

Mooted? Its already there in SMSQ/E V3.11 in the form of the Home Directory.
A freestanding version is also available for Qdos/Minerva.

Besides that I find system default directory names are usually just a
nuisance. In particular FTEST should be freed from using a default
directory.

Altering the default directory, even if only briefly, from within a
distributed program is usually a BAD idea. But if you really, really have to
use default directories, why use POKE when DATA_USE/PROG_USE is available
for that purpose?

Finally, it appears FTEST/FOP_IN has a problem handling array slices, as the
following demonstrates (SMSQ/E V3.12):

100 DIM k$(10)
110 k$="win_j"
120 CLS
130 e = FOP_IN(k$): Disp k$: REMark Correct
140 :
150 FOR i% = 0 TO DIMN(k$)
160  e = FOP_IN(k$(1 TO i%))
170  Disp k$(1 TO i%)
180 END FOR i%
190 :
200 DEFine PROCedure Disp(n$)
210 PRINT n$; ':',
220 IF e < 0 THEN
230  PRINT e
240 ELSE
250  PRINT FNAME$(#e)
260  CLOSE#e
270 END IF
280 END DEFine
290 :

All but the one marked Correct simply open the default data device, same as
if you supply a null string.

Per
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to