[futurebasic] A pending problem

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : October 1999 : Group Archive : Group : All Groups

From: Robert Schenk <robert_schenk@...>
Date: Thu, 28 Oct 1999 12:39:16 -0500
I have an appending problem. The following bit of code works for me
correctly under FB-2, but when I run it under FB^3, the second function,
which is supposed to append something to an already existing file, does not
do anything. (When you run the program, it puts up a standard save file
dialog, and then it puts up an open file dialog. When you select a file to
open, it is supposed to append the word "append" to it.


Hope this makes some sense. In short, the first function, the dosave, works
OK. The second one, doappend works in FB-2 but not in FB^3.

Why?

R Schenk

LOCAL FN dosave'***************************
dim storage$,  b$
storage$=FILES$(_fSave,"Give this file a name:","untitled file", volrefnumber)
LONG IF storage$<>""
DEF OPEN "TEXTttxt"
OPEN "O", #1,storage$,,volrefnumber
b$="save"
PRINT #1, b$+CHR$(13);
PRINT #1, CHR$(13);
CLOSE #1
END IF
END FN

LOCAL FN doappend'******
dim storage$,  b$
storage$=FILES$(_fOpen,"TEXT",, volrefnumber)
LONG IF storage$<>""
b$="append"
OPEN "A", #1,storage$,,volrefnumber
PRINT #1, CHR$(13);
PRINT #1, b$+CHR$(13);
PRINT #1, CHR$(13);
CLOSE #1
END IF
END FN

FN dosave
FN doappend
end