Environment

ENVIRONMENT FILES
CHANGES IN THE ENVIRONMENT
LAUNCH OPTIONS
SEVERAL ENVIRONMENTS
MINIMAL CONFIGURATION
TRANSLATION

















































ENVIRONMENT FILES

standard        minimal        executable        interpreter        anyflo

Standard configuration

Containing:
Some executables: interpreter.exe anyflo.exe

*.js launching java scripts files for anyflo (with different configurations) and demos.

File initb.h containing the environment folder name env and *.h configuration files names:
env/
enva.h,koma.h,mesa.h
envb.h,komb.h,mesb.h
envc.h,komc.h,mesc.h


Folder env:
containing these 9 files:
     enva.h: configuration parameters for interpreter.
     koma.h: language worf names.
     mesa.h: messages from the interpreter.
     envb.h: configuration parameters for anyflo.
     komb.h: commands names of anyflo.
     mesb.h: messages from anyflo.
     envc.h: configuration parameters for application.
     komc.h: configuration parameters for application.
     mesc.h: messages from application.
and containing:
     demo0_*.func: interpretyer demos.
     demo1_*.func: anyflo demos.
     others xxx.func: utilitaries.
     *.0.htm: interpreter helps.
     *.1.htm: anyflo helps.
     others xxx.htm: helps.

For a language xxx other than english the folder env must contain the files:
     Voc_eng and Voc_xxx
whitch are sentences (in English) and their translation into the langage xxx.
See generate message.
Note:
Another extension than xxx can be forced in file enva.h.

The folder exe:
containing executables *.exe

The folder ima of the datas base.

Minimale configuration

A simplified configuration anyflo containing only:
AIDE_ANYFLO_WEB.htm: help on the web
anyflo.exe interpreter.exe
Environment folder env containing files enva.h,koma.h,mesa.h, envb.h,komb.h,mesb.h,envc.h,komc.h,mesc.h, the test functiuon test.func
*.js: launching java scripts files
File initb.h:
          env/
          enva.h,koma.h,mesa.h
          envb.h,komb.h,mesb.h
          envc.h,komc.h,mesc.h

Datas base folder ima.
Note: This configuration is very light (the zip is less than 4 MB), has no help nor demo nor any tool, however, they are accessible via the file AIDE_ANYFLO_WEB.htm which gives access to the online documentation on the ATI website (internet connection is required). you have to download if major changes (change of index x of version anyflo.x.y).

Executable:

The executable anyflo.exe can not operate alone, it needs at least the files initb.h, enva.h,koma.h, mesa.h, envb.h, komb.h, mesb.h, envc.h, komc.h and mesc.h of the minimal configuration.
It will download this file in the root folder distribution for update executable anyflo in the case of minor changes (change of index y of version anyflo.x.y).

Interpreter

File enva.h contains:
       mac = machine name (PC default).
       env=environment forder (env/ default).
       ima=datas base folder (ima/ default).
       exe=executables folder (exe/ default).
       buf=size of the read buffer (100000 default).
       eva=size of the evaluation buffer(2000000 default).
       com=size of the compile buffer.
       esc=ascii code of escape character (27 default).
       voc1=Voc_eng: english vocabulary
       voc2=Voc_xxx: vocabulary of xxx language
File koma.h contains the list of interpreter commands as:
Command number and name:
       |number: nom
Parameters:
       emp,sem,dim,type
       sem = [yes no] com
       type=0: com com -> com(com)
       type=1: com com -> com com
       type<0: cancels the evaluation
Default values:
       v1,v2,...,\
       vn,...\n
       [n]=v: n values initialized to v
       [n]: n values initialized to 0
       .: indeterminate values
Alias (to define commands in several languages) can be added after the name of the command:
       |number: nom alias1 alias2 ...
File mesa.h contains the messages list from the interpreter:
|number: message

Anyflo files

File envb.h contains:
Sons:
       son=sounds folder.
Screen sizes:
       x=dimx
       y=dimy
              If dimx = 0: dimx = maximal x dimension.
              If dimy = 0: dimy = maximal y dimension.
       If dimx = h between 0 and 1: dimx = h * (maximal dimx).
       Si dimy = h between 0 and 1: dimx = h * (maximal dimy).
Displacement of the bottom of the screen:
       dy=d: (dimy = Dimy default-dy)
       Other form: win=x,y
       vid: video window.
       ful: full screen.
Multipliers (x and y axes orientations):
       cx = 1
       cy = -1
Number of bits of a color component
       rvb = 8
      
Zbuffer:0(off) 1(16 bits) 2(32 bits)
       zbu = 0 (off), 1 (16 bits), 2 (32 bits).
Dimension table of precomputed random:
       alea = 10000
Indicator graphic processor: 0(off) 1(on)
       gra = 0 (off), 1 (on)
Devices:
       per=
File komb.h contains the list of anyflo commands in the same format as koma.h
File mesb.h contains the messages list from anyflo in the same format as mesa.h

CHANGES IN THE ENVIRONMENT

Directory changes

         To change the name of the directory containing the files env*, kom* et mes*:
       Put his name in initb.h
       To change the name of the directory containing the files help*, demo* et outil*:
       Put his name in enva.h
       To change the name of the user directory:
       Put his name in enva.h

Change the stack sizes

         In case of overflow, a message indicates the name of the stack whose size must be increased. Example: The message Overflow, increase Dim_mac (in enva.h) indicates that the compilation stack is too small (when loading large files functions)

Change the escape character

Key ESCAPE (ASCII code 27) allows to interrupt a treatme:
       Debug mode
       Interaction mode

Change the commands and the messages

         The command names are in files:
       koma.h language
       komb.h anyflo
       For anyflo expresses in another language, just translate the files koma.h, mesa.h, komb.h et mesb.h
       To make it "speak" several languages at the same time, any number of aliases can be added after each name.

Change graphic

         The screen size, the number of bits of the color and name of the graphic processor can be modified:
Screen size
       win=1024,768: Defines a 1024 by 768 image.
       x=0 y=0: full screen.
       win=1024,768 dy=80: Defines a 1024 by 688 image and a margin of 80 pixels down.
       win=vid (ou vid): video size 768 by 576
       win=ful (ou ful): full screen. Some side effects (such as jitter) can be avoided by replacing the option win=ful by x=0 y=0 or win=0,0.
       win=win: screen size in win file.
      
Screen origin
       orx=x ory=y (0,0 default)
The following indicators are used to manage the image in different modes:
       graphic processor: 1 if present

Change the device names

       To connect a VCR or a tablet, specify the device name.
Example:
       peri1 = /dev/magn
       To connect an audio jack or a sensor, specify the name of the driver and the device name.
Exemple:
       aud = audio0 /dev/audio

LAUNCH OPTIONS

For the launch options click anyflo_help.js (which launches anyflo with the help option).

Interpreter ptions        anyflo options

Interpreter ptions

All options of file enva.h can be modified when launching (they become priority).
Default:
buf
       buf=100000: read buffer.
cod
       cod=ccc: decoding as the key ccc.
       cod=* is the super user coding.
com
       com=100000: compile buffer.
deb
       deb: debug (allows follof the launching process)
emp
       emp=10000: commands stack;
env
       env=env/: environment folder.
esc
       esc=27: escape character.
eva
       eva=1000000: evaluation buffer.
exe
       exe=exe/: executable folder.
htm
       htm=code_htm: file containing html codes.
ID
       ID: do not write threadID
lan
       lan=f1() f2() f3() ...: functions performed at the launch.
mac
       mac=PC MAC SGI: machine name.
mal
       mal=100000: maximum size of mallocs.
pri
       pri=5000: maximum size of prints.
sys
       sys: prints sysinfo
ima
       ima=ima/: datas base folder.
voc
       voc1=Voc_eng: english vocabulary.
       voc2=Voc_xxx: vocabulary of xxx language.
Note:
voc1=Voc_eng voc2=Voc_eng inhibites the translation (useful e.g. for system("copy fic1 fic2"))

Anyflo options

All options of file envb.h can be modified at launch:
ale
       ale=10000: size of the table of random.
cx cy
       cx=1 cy=-1: multipliers x and y.
dy
       dy=40: the bottom of the window is raised to 40.
ful: full screen.
gra
       gra=1: memory image of the graphic processor: 1 (on), 0 (off)
hei
       hei=dimx,dimy: dimensions of the high definition image in memory.
orx ory
       orx=x ory=y: origin of the left upper corner of the window .
per=driver: device driver (capteur).
PER=100: display rate.
rvb
       rvb=8: Number of bits of a component R G B.
son
       son=/usr/share/data/sounds/soundscheme/soundfiles: sounds folder.
vid: video size.
see: interaction mode with yes see.
win
       win=ful: full screen.
       win=vid: video size (768 * 576).
       win=x,y: dimensions (x * y), if(x==0) x=max, if(y==0) y=max.
x y
       x=600 y=400: screen size: 600 by 400 pixels.
       x=0.5 y=0.5: screen size is half maximum size.
       x=0 y=0: maximum size.
       0<x<1: x * (x full screen).
       0<y<1: y * (y full screen).
Exemple:
       x=0.5 y=0.5: window will anyflo dimensions halves of those full-screen mode.
zbu
       zbu=1: Z_buffer: 0 (off), 1 (16 bits), 2 (32 bits).

Example 1:
       anyflo com=100000 ini=/bin/initb.perso lan=toto()
Launches anyflo with:
       1) Main file /bin/initb.perso
       2) Compile buffer size = 100000
       3) Runs func toto.func
Example 2:
       anyflo lan="f0() f1() f2()"
The function f0, f1 and f2 are executed circularly whenever one of them makes a return (allows to chain interactive demos).
Note: It is possible to pass parameters to functions f:
       anyflo lan="f0() f1(0,\"string\") f2(7,(0,1))"
Additional options:
exe=executables folder: *.exe
exemples:
exe=../
exe=exe

SEVERAL ENVIRONMENTS

1) Create several directories, for example:
       c:/anyflo_fra: containing a full environment in french, and anyflo.exe
       c:/anyflo_ang: containing a full environment in english
2) Create 2 shortcuts on the desktop:
anyflo_fra.js containing:
       WshShell.Run("c:/anyflo_fra/anyflo.exe env=env ima=ima win=768,576");
and anyflo_eng.js containing:
       WshShell.Run("c:/anyflo_eng/anyflo.exe env=env ima=ima win=768,576");
3) Network (Unix):
If the software is installed in the directory / usr / anyflo of machine belle whose the usr is mounted in /belle, anyflo shell file in /bin would look like:
       /belle/anyflo/anyflo_INDY env=/belle/anylfo

MINIMAL CONFIGURATION

Anyflo can run without any environment file, the only executable anyflo.exe and glut32.dll enough, however the helps and demos are no longer available in local nor the image files conversions.