Deutsch English
Home
About tdbengine
Newsletter
Download
Helpware
Forum
Chat
Documentation
Installation
Configuration
First Steps
Runtime Switches
Text files
System functions
Database functions
Index functions
Full-text Indexing
Memos and BLOBs
Semaphore concept
Error codes
Hints for PHP developers
Basic Course
Function reference
HOWTO...?
Projects
Links
Benchmarks
Bug Reporting
Support request
 
Home    Overview    Search    Impressum    Contact    Members
First Steps
The scope of delivery includes along with tdbengine-package following tools:

test.prg        (writes "Hello world...")
pdk.prg         (translates source code = program development kit)
ddk.prg         (tool for administering data bases = database development kit)
dmk.prg         (easy database management = database modification kit)
...

The most important tool is pdk.prg. So let us start a browser and type in the URL: http://localhost/cgi-tdb/pdk.prg. In return we receive a page with two entry fields and a number of buttons. Then press the button load. A new program is started (scanfile.prg), which allows the interactive choice of a file name. Finally, this program transfers the control again to the pdk and the chosen source text is loaded. Then choose test.mod, the source text of the program is displayed in the large window. Now you see here:

PROCEDURE Main
  CGIWriteLn("content-type: text/html")
  CGIWriteLn("")
  CGIWriteLn("Hello world...")
ENDPROC

It is a small EASY-program. EASY is name of the TurboDatenbank programming language. EASY is a procedural programming language with many features of Pascal and C. An EASY-program has normally the ending .mod (for module) and from the beginning it must be translated into a .prg-file before it can be loaded by the tdbengine-package. This translation has two advantages: firstly, the syntax can be checked in the first instance, and secondly, the translated program is executed much faster than source text scripts. A .prg-file requires always the tdbengine to be executed.

Now let's try some little experiments. Open another browser window therefore and go to the URL: http://localhost/cgi-tdb/test.prg there. Again you see the output "Hello world...", which is not too exciting anymore.

Now come back to the original browser window with the source text: test.mod. Change the word Main into Mein and then press the compile-button. This program is also translated without error message. But if you execute it now (return to second browser window and press "Reload"), you see a message like this:

Error -5 in module: /usr/bin/cgi-tdb/test.prg

This means that something is wrong. In this case the procedure Main is not found. Only this procedure is executed by tdbengine So let us quickly change Mein back into Main again and compile the source text. Now everything is fine again.

In second experiment, please set two anterior dots before the first both events of CGIWriteLn(). In doing so lines are commented in EASY and so are not translated.

PROCEDURE Main
  ..CGIWriteLn("content-type: text/html")
  ..CGIWriteLn("")
  CGIWriteLn("Hello world...")
ENDPROC

Let's test also this program again, by pressing the compile-button and then reload it in the other window of the browser. Now we receive an error message from the http-server, which informs us that the application has not returned a correct header. Now we know that the two lines were quite important for our program. Finally we undo this replacement as well, but we comment the third line of the procedure out. This time the program execution returns an error message from the browser: The document is empty.



tdbengine Anwendungen im Web:

Open-Source Web CMS


Open-Source Bug-Tracking


Free wiki hosting

Open-Source Wiki-System

Kostenloses Foren-Hosting

Dišt mit tdbengine 8-)

tdbengine chat
irc.tdbengine.org
#tdbengine

   Copyright © 2003-2004 tdb Software Service GmbH
   Alle rechte vorbehalten. / All rights reserved
   Last changed: 05.05.2004


ranking-charts.de

Programmers Heaven - Where programmers go!