*******************************************************************************
*
* PRODIDACT Language Auteur - PDDLA
*
* This is a sample of the PRODIDACT programming Language created
* to develope multi-media MS-DOS applications. The language was
* created by Frederic Torres in 1990 and used in numerous applications
* up to 1993. The run time was written in Turbo Pascal/Borland Pascal.
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* The PDDLA Programming Language
* ------------------------------
* The language was a simple structured programming language inspired by the
* PASCAL language. All the reserved keywords are in French.
* The language execution was based on an interpreter.
*
*
* Language
* - - - - -
*
* Though, it was inspired by PASCAL there was some differences.
*
* - No user function.
*
* - Variable Scope: Local variables were actually available to any sub
* procedures called. This is bizarre and a probably not a good idea.
* But this is how I implemented the variable/memory manager.
* At the end of a procedure all local variables would be discarded.
* It was also possible to declare global variables.
*
* - Array: There was no array, but array could be simulated using the
* & macro concept as implemented in the dBASE language. See below in
* this file.
*
* - Procedure Pointer/Delegate: It was possible to simulate procedure
* pointer/delegate using the & macro concept.See below in this file.
*
* - Object Orientation: The language was not object oriented, but allowed
* the char '.' in procedure and variable name. Therefore creating the
* illusion of some kind of object orientation.
*
* - Debugger: There was no debugger, but a real time tracing mode at the
* top of the screen.
*
* - Source code overlay:It was possible to load and un load dynamically
* source code. The reason why is that we had only 640 Kb of memory.
*
* - String could has predefined max length to save memory.
*
*
* Multi media support: (Obvisouly in 2010 this sound lame, but it was in 1990).
* - - - - - - - - - -
*
* - Keyboard and mouse
* - 16 colors PCX image
* - Amimation (list of images displayed in loop)
* - Hypertext file (basically it was simple HTML file)
* - Special text display and menu in form of comic strip
* - Customizable font.
* - Virtual memory manager to save and restore screen area.
*
*
* Integrity
* - - - - -
*
* The source files can be encrypted before shipping. Applications shipped
* could not be altered all image files, hypertext files and dictionary
* definition files would be verified at the starting time. If a change was
* detected the application would not start.
*
*******************************************************************************
* Include the file Lib.EAO
$I Lib
*******************************************************************************
** Procedure Debug (AKA Main)
**
Procedure DEBUT;
GlobalVariables.Initialize;
Chemin("images",""); * Define the sub paths where to the pcx images
Screen.Clear;
Screen.PrintXY(0, 0, "Hello World - Press SPACE to continue");
Image("VOITURE1", 200, 200);
UserPause;
Screen.Clear;
Array.Demonstration;
UserPause;
Screen.Clear;
ProcedurePointer.Demonstration;
UserPause;
Screen.Clear;
RunModule("MyModule", "PrintThis");
UserPause;
HyperTexte("HyperText.HT", "Page1");
UserPause;
Fin;
*******************************************************************************
**
**
Procedure Array.Demonstration;
Chaine MSG_0 := "message 1"; * declare a string
Chaine MSG_1 := "message 2";
Chaine MSG_2 := "message 3";
Entier i := 0;
TantQue i<=2 Faire * While loop
Chaine s := "MSG_" + Chaine(i);
Chaine ss := &s;
Screen.PrintXY(0, i * 14, ss);
i := i + 1;
Fin;
Fin;
*******************************************************************************
**
**
Procedure ProcedurePointer.Demonstration;
Chaine s := "MyProcedure";
&s; * Call procedure MyProcedure indirectly
Fin;
*******************************************************************************
**
**
Procedure MyProcedure;
Screen.Clear;
Screen.PrintXY(0,0,"My Procedure");
UserPause;
Fin;
*******************************************************************************
**
**
Procedure RunModule(Chaine m,p)
ChargeModule(m) * Load module
&p; * Execute procedure name contained in variable p
DeChargeModule * Unload module
FIN;
See file LIB.EAO
No comments:
Post a Comment