[RPL/2] RPL/2 4.00pre8c
BERTRAND Joël
joel.bertrand at systella.fr
Mar 7 Déc 19:52:13 CET 2004
Hello,
New release is announced. It is now possible to use sequential
formatted files (with all formats and all intrinsics).
Unformatted sequential files are in progress ;-)
Don't forget that a file record has to be a list. For example:
#!/home/bertrand/gopher/rpl2/build/src/rpl -sc
FICHIER
<<
{ "standard*(*)" "character*(*)" }
if
"fichier_formate" "existence" inquire
then
{ "fichier_formate" 'sequential' 'replace' 'readwrite' 'formatted' }
else
{ "fichier_formate" 'sequential' 'new' 'readwrite' 'formatted' }
end
open format
-> DESC
<<
1 25 for I
I "X" 2 ->list DESC write
next
DESC rewind
do
DESC read disp
until
DESC "end of file" inquire
end
"Quelques petits coups de BACKSPACE" disp
while
iferr
DESC backspace
then
false
else
true
end
repeat
DESC read disp
DESC backspace
end
DESC close
>>
{ "character*(*)" }
if
"fichier_formate2" "existence" inquire
then
{ "fichier_formate2" 'sequential' 'replace' 'readwrite' 'formatted' }
else
{ "fichier_formate2" 'sequential' 'new' 'readwrite' 'formatted' }
end
open format
-> DESC
<<
{ 'name' } DESC write
DESC close
>>
{ "standard*(*)" { "character*(*)" } }
if
"fichier_formate3" "existence" inquire
then
{ "fichier_formate3" 'sequential' 'replace' 'readwrite' 'formatted' }
else
{ "fichier_formate3" 'sequential' 'new' 'readwrite' 'formatted' }
end
open format
-> DESC
<<
{ 1.23 { "E" } } DESC write
DESC close
>>
>>
See help about open, close, inquire, backspace, format, rewind,
read, write, create, delete ("cmd" help in interactive mode).
Explanations about formats are written in src/formateur_fichiers.c
Regards,
JKB
Plus d'informations sur la liste de diffusion RPL2