[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Temp file names



Reply to note from Harry Binswanger  Fri, 20 Jun
2003 13:57:08 -0400

> I've forgotten: what does Xy4DOS call a temp file?

Is that a trick question, Harry? You can call a temp file anything
you like, of course -- as long as it doesn't duplicate an existing
filename. There's a U2 routine called TMPFILE that generates
likely-to-be-unique 8.3 filenames at will (the filename is output to
Save/Get 50). Hit TMPFILE a few times to see what it does.

> My immediate use is to have the pgm have a window to display a
> message that's too long for the command line.

For that you don't even need to name the file. Just display the
error message in an Untitled file. Here's a template: It puts the
message (in Save/Get 01) in a centered window. The window length
adjusts automatically based on the length of the message. The
window closes on the next user keypress. Messages of 80 or fewer
chars are displayed as PRompts.

XPLeNCODE v2.0
b-gin [UNTITLED]
;*; Template to display long error message in a text window (
Xy4)[cr|lf];*; CLD 6/20/03[cr|lf];*;[cr|lf];*; Error message:
[cr|lf]{<}SV01,Long error text blah blah blah blah blah blah{032}
blah blah blah blah blah blah blah blah blah blah blah blah b
lah blah blah blah blah blah blah blah blah blah blah blah bl
ah blah blah blah blah blah blah blah blah blah blah blah {>}
;*;[cr|lf];*;[cr|lf]{<}IF{<}VA$WA{>}>0&{<}VA|01{>}>80{>}{<}SX
02,{<}VA$WA{>}{>}{<}SX03,2+{<}VA|01{>}/60{>}[BX_]window/nv {<
}PV02{>},8,4,62,{<}PV03{>}[Q2_][BX_]ne/100[Q2_]{<}GT01{>}{<}P
R|Error alert - Press any key{>}{<}SX01,{<}RK{>}{>}[BX_]ab/nv
[Q2_]{<}IF{<}VA$WN{>}=={<}PV02{>}{>}[BX_]rs[Q2_]{<}EI{>}{<}EX
{>}{<}EI{>}{<}PR@01{>}{<}EX{>}[cr|lf][cr|lf]
-nd
XPLeNCODE

--
Carl Distefano
cld@xxxxxxxx
http://users.datarealm.com/xywwweb/