Logiweb(TM)

6.3.7 Executables

Prev Up Next Page 66 of 800 Search internet


In the previous step you saw that the user rendering subdirectory contained a bin subdirectory. To view it, cd to foo/base/page/bin and do ls. The contents are:

hello
A program which writes Hello World.
echo
A program which echos character from terminal input to terminal output.
eecho
A program which echos character from terminal input twice to terminal output.
lgciotest
A program which exercises the lgcio interface.

The lgcio interface was touched upon at the end of File output from the compilation. It is the thing stored in

   ~/.logiweb/logiweb/dll/521FC2292E93F16E6364E9EB6DF851F393BB2A50.c

To try the programs, proceed as follows. Type:

   ./hello↵

to get

   > ./hello
   Hello World

Then type:

   ./eecho↵abc↵deq↵

to get

   > ./echo
   abc
   aabbcc

   deq
   ddee

Each executable is a Logiweb machine which is implemented as a Logiweb script. To see the script, do thus:

   > more eecho
   #!/usr/bin/lgwam script
   string
   01AB1F51C8C17606A5C0331B5689B4858C796547B9A0A4AEF0BCB2BB0806
   eecho
   execute

Line 1, 2, and 5 are the same for all Logiweb scripts. Line 3 and 4 identify the program to execute. The lgwam(1) program is the Logiweb Abstract Machine which is a generic machine capable of implementing arbitrary Logiweb machines.

Now we are at it, try this:

   > which lgc
   /usr/bin/lgc
   > more /usr/bin/lgc
   #!/usr/bin/lgwam script
   string
   010B8CEF872E4CAE653DCBA950DA8437DE154147ADBAE6B1F9D5B2BB0806
   lgc
   execute
   siteconfig=/etc/logiweb/lgc.conf

As you can see, lgc(1) itself is a Logiweb machine implemented as a Logiweb script.

Line 6 of the script is a soft compiled in default. The lgc compiler uses it as the default value of the siteconfig parameter. You can change or delete this soft compiled in default using a text editor. And you can add other, soft compiled in defaults overriding the hard compiled in defaults. The hard compiled in defaults are those stated in lgc.lgs. To change hard compiled in defaults you have to change lgc.lgs and recompile.

Prev Up Next Page 66 of 800 Search logiweb.eu

Copyright © 2010 Klaus Grue, GRD-2010-01-05