read

Returns the contents of a file

read
alias        ascii
compile
demo         dim         directory         directory write
func         format
generate
history
matrix
name
system
type
var
write

read

read("nnn")

returns the content of file nnn.

read

Returns the names of all files in the current directory.

directory("ddd")name("*.eee"): returns the names of all files *.eee in directory ddd.

number(inc): returns the number lines inc of file nnn.

read("?nnn")         Used to analyze the text of the file nnn:
Available commands:
help: gives the help.
end: end.
char: characters.
long: longs.
float: floats.
ad1,ad2: ad1 and ad2 are addresses.
Words form addresse ad1 to addresse ad2 are displayed according to the format: char long float.
Notes:
read(nnn)number(inc) returns the float number inc of file nnn

Notes:

File search takes place:
        First in current directory
        then in directory "ima"
        and finally in directory "env"

this command does not work in see mode.
See also read format

Exemples:

directory("ima")name("")
       returns the names of all files in directory "ima" without extension.
directory("ima")name("*.bmp")
       returns the names of all files *.bmp in directory "ima".

read alias

read alias(nnn)

        Reads the alias file nnn.ali

read ascii

read ascii(nnn)

        Returns the decoding of ACIII file nnn.

read compile

read compile(nnn)

        Reads le the functions file nnn.func and the compile file nnn.com. If yes link is active (defalut) links all functions.

read demo

read demo com

        Reads the demo file of the command com.
Example: read demo for; reads file demo0_for.func

read("nnn")dim

        Returns the size of file nnn.

read directory

read directory

        Returns the names of every file of the current folder.

read directory directory

        Returns the names of directories of the current folder.

read directory("ddd")

        Returns the names of every file of folder ddd.
Options:
format("eee"): files *.eee

read directory("ddd")directory

        Returns the names of every directories of folder ddd.

read directory name("nnn")

        Returns the names of files nnn

read directory("ddd")name("nnn")

        Returns the names of files nnn of folder ddd.

read directory directory name("nnn")

        Returns the names of files nnn and directories.

Note:
Save result in file tmp

Example:
w=read directory("env")name("*.func");edit(w);
Edits the names of files *.func of directory env.
w=read directory("env")directory name("*.wav");edit(w);
Edits the names of files *.wav and files without extension of directory env.

read directory write

read directory("rrr")write directory("www")

        Copies directory rrr to directory www.

read func

read func(nnn)

        Reads the functions file nnn.func. If yes compile and yes link are active (default) all functions are compiled and linked.

read func(nnn) inclu("ccc")

        Reads the functions file nnn.func coded by read("nnn.func")write(".ext")inclu("ccc")
Note: if ccc=*: superuser
launch anyflo with option:
anyflo lan=nnn cod=*

read format

anyflo
char
double
float
htm
long
short

x=read format("anyflo") name("nnn")

        Assigns the datas of formated anyflo file nnn to x:

x=read format("char") name("nnn")

        Assigns the content of characters file nnn to x (8 bits).

x=read format("double") name("nnn")

        Assigns the content of doubles file nnn to x (sur 64 bits).
It has been necessary for writing such files by the command write name("nnn") format("fff").

x=read format("float") name("nnn")

        Assigns the content of floats file nnn to x (32 bits).

read name("nnn")format("htm")

        Returns the content of formated html file nnn (only htm tags of file code_htm are decoded).

x=read format("long") name("nnn")

        Assigns the content of longs file nnn to x (32 bits).

x=read format("short") name("nnn")

        Assigns the content of shorts file nnn to x (16 bits).

read generate

read("opt=expr")generate("opt")

       Returns the evaluatiuon of expr.
Note: allows read options.
Examples:
read("opt=1,2,3")generate("opt"); returns 1,2,3.
read("opt1=1,2,3;opt2=-1,-2")generate("opt2"); returns -1,-2.
read(read("fic"))generate("opt2"); returns -1,-2 if file fic contains:
opt1=1,2,3
opt2=-1,-2

read history

read history("nnn")

       Loads file nnn.his on commands stored.

read matrix

read("nnn")matrix

        Returns the float content of ascii file nnn containing nb matrices dimensions nx * ny (nx columns, ny lines):

x1,1 x1,2 ... x1,nx
x2,1 x2,2 ... x2,nx
....
xny,1 xny,2 ... xny,nx


x1,1 x1,2 ... x1,nx
x2,1 x2,2 ... x2,nx
....
xny,1 xny,2 ... xny,nx

...

x1,1 x1,2 ... x1,nx
x2,1 x2,2 ... x2,nx
....
xny,1 xny,2 ... xny,nx

After reading the command dim matrix returns the 3 integers nb,nx,ny.
Error:
In case of error the command returns NIL with message:
matrix(nb): error on line edited of matrix nb.
x: nx != nx0: different numbers of columns.
y: ny != ny0: different numbers of lines.

read name

read name("nnn")

        Returns the content of file named nnn.

read system

read system("com")

        Returns the result of the command com.
Notes:
1) Typically, com can be a call program with arguments.
Exemple: x=read system("prog -1 4.5 A");
2) To run a program on another machine name "host" (under UNIX):
x=read system("rsh host prog -1 4.5 A")
3) It is necessary that the program provides an output.

read type

read type("nnn")

        Reads the file nnn of types nnn.type

read var

read var("nnn")

        Reads the variables file nnn.var

Notes:

        1) read com "nom1,nom2"
        Reads file nom1.com and adds the content of nom2.com
Exemple:
read func "foo,fii"
Reads the functions file foo.func and adds the content of fii.func
2) read type1 type2 ... typen name("nnn")
        Reads objects of types types type1, type2, ..., typen of generic names nnn
Example:
read func var "foo,fii" reads the files foo.func foo.var and adds the contents of files fii.func fii.var

read write

read("name1")write("name2")

Copies file n1 on file n2.
Example:read("../../bmp1")write("../../bmp2");
Copies all files of directory ../../bmp1 in directory ../../bmp1.

Command of conversion files according to their type

add
ascii
dim
func
html
inclu
inv
name
string
type

read write add

read("*.eee")write("f.add")add
       Concatenates the file *.eee in file f.add
Options:
add("key_word"): key word between the files (by default the system chooses a key word).
dim(n): forces a random key word size n.
edit: edites the files names.
read("fold1/*.eee"): manages files of folder fold1.
write("fold2/f.add"): writes the file f.add in folder fold2.

read("fold1/f.add")write("fold2")add
       writes the files concatened in file fold1/f.add in folder fold2.

Ascii files translator

read("A")write("B") format("LA")format("LB")
Translates the ascii file A written in the language specified by the file LA in the file B written in the language specified by the file. LB.

read("A")write("B") var("word1")var("word2")
Translates the ascii file A in file B by replacing all occurrences of "word1" with "word2"

Note: His is a translation of words delimited by an alphabetic character left and right with an alphanumeric character.
Examples:
If LA contains word mota and if LB contents word motb
       )mota is translated into )motb
       mota(x) is translated into motb(x)
       xmota is not translated
Options:
string: all sub strings A will be translated.
Examples:
If A is:
../../mota/K

if LA is:
../mota

and if LB is:
../../motb
then:
read("A")write("B")format("LA")format("LB")string; produces file B:
../../../motb/K

read write dim

read("nnn")write dim(n)
splits file nnn in files nnn_1, nnn_2, ... size n octets, d = 100000000 (100 Mo) default.
Useful for handle big datas.
See read write inv to gather those files into original file.
Options:
edit: edits teh files name.

Convertisseur de fichiers de fonctions

read("nnn.func")write("nnn.func")format("V_fra")format("V") format("koma_fra.htm")format("komb_fra.h") format("koma.htm")format("komb.h")
Translates functions file nnn.func written in the language specified by the file V_fra into the functions file nnn.func written in the language specified by the file V.
Options:
Any even number 2 * n files VAi et VBi can be specified, the first n vocabularies describing a language and the last n vocabularies describing another language.
Example:
format("koma_fra.htm")format("komb_fra.h") format("koma.htm")format("komb.h"): 2 files vocabularies are specified (for the interpreter and anyflo).

Fichiers html

read("A.htm")write("B.htm")
A.htm is an html file with special characters, it will be written by encoding the characters in the format in html file B.htm.
Notes:
1) This command is not an html code generator but simply treats the special characters (such as French accents) in a file already coded html.
2) Html expressions already established such as <...> and &...; are not coded, the characters < & are not no more. When a tag is not closed in the same line, it is automatically completed and a WARNING is generated. It is therefore essential to encode the characters & (in &amp;) and < (in &lt;).
3) Html codes are in code_htm and are read to launch anyflo (this file can be changed with the launch option htm).
4) The most common errors are:
       Do not code < is taken for a start tag
       Do not code & is taken for a start tag
       Write &nbsp instead of &nbsp; causing a bad coding any more.
Options:
debug: The file env/COMPTE_RENDU is written as:
       read file name -> write file name
       line number: error code html
       line where the error occurred
debug("nnn"): the errors file is nnn instead of nnn default env/COMPTE_RENDU.
directory("ddd"): search for files in the folder ddd.
read("dos/*.htm")write
Converts all files *.htm of folder dos back themselves.

read write inclu

read("nn1.ee1")write("nn2.ext")inclu("ccc")
        Cryptes the file nn1.ee1 in file nn2.ext according to the code ccc.
read("nn2.ext")write("nn1.ee1")inclu("ccc")
        Decryptes file nn2.ext in file nn1.ee1 when nn1.ee1 has been crypted by the preceding formula.
Examples:
read("fic.c")write("fic.ext")inclu("CODE")
        Cryptes the file fic.c in file fic.ext according the code CODE.
read("fic.ext")write("fic.c")inclu("CODE")
        Decryptes this file.
read("fold1/*.cc")write("fold2/*.ext")inclu("CODE")
        Cryptes all files *.cc of folder fold1 in files fold2/*.ext according to the code CODE.
read("fold2/*.ext")write("fold1/*.cc")inclu("CODE")
        Decryptes all those files.

read write inv

read("nnn")write inv
gathers files nnn_1, nnn_2, ..., (created by write("nom")write dim(n)) into file nnn.
Useful for processing big datas.
Options:
edit: edits teh files name.

read("nn.eee")write format("E1,...")format("F1,...")name

If nn=*mot1*, and if mot1 contained in a file Ei then nn=*mot1* is renamed nn=*mot2*, mot2 being the translation of mot1 in file Fi used by translate.func translating anyflo from English into another language xxx.

read("input")write("output")string("string1")string("string2")

Read file input, replace all occurences of string string1 by string2 and write the result in file output.
Notes:
output=input by default.
string2 is empty by default.
string("s1_1")string("s1_2")string("s2_1")string("s2_2")...
replace all occurences of string si_1 by si_2
Options:
debug: writes the numbers of lines changed and WRITE output if the file is saved.
dim=n: specifies the number maximal of lines edited (12 default).
Special characteres:
put ascii code.
Example:
read("input")write("output")string(10)string(10,92);
replaces every \n by \n\\.

read("A")write("B")type("ttt")

ttt=upp: converts lowercases of A to uppercases of B.
ttt=low: converts uppercases of A to lowercases of B.