|
|
|
|
Level 2 - Les User4gl -
All programs ENDUSER4GL are developed within a textual file. The extension of these files is EU4glExe and not the conventional extension which is txt Then, still with Explorer, Click on the file in order to run the program EndUser4gl. Example : ** ****************************************************************************************** * ** EndUser4gl : Example for 4gl ** ******************************************************************************************* ** Lower case or capital letter indifferent, a length of any variable declaration not being to > 30 characters comment/commentaires : ** comment/commentaire. ou /* comment/commentaire /*
** EndUser4gl Ph Bergougnoux ** ******************************************************************************************* ** Structure pgm EndUser4gl : 3 FORM : ** 1- Not Structure ** 2 - Structure : Global-End_Global,Begin_Main - End_Main, declare : Func ou procedure ** 3 - Object : en cours.. ** ******************************************************************************* ** FORM 1 : Not structured ** **************************************************************************************** ** declare & Instructions ; ** Ex :display "HELLO" ** or Char : Label:50 := "HELLO" Display Label;
** **************************************************************************************** ** FORM 2 :structured ** **************************************************************************************** ** GLOBAL include file :#include <file> integer : <name> long : <name> char : <name:xxx> float : <name dec(xx)> double : <name dec(xx)> table: <name> occurs xx { integer :name1... etc*..} tableBtree : <name> { "string"...} Struct <name> { integer :name1... etc*..} etc.. ** comment/commentaire /* comment/commentaire /* End_global Begin_Main
instructions... Function , procedure ... end_Main ** ** Declare function /Procedure : proc <name> ( char..,integer... ) begin_procedure Local char : ..integer.. end_local instructions... end_procedure func <name> ( char..,integer... ) begin_function Local char : ..integer.. end_local instructions... end_function ** ** ************************************************************************************ ** Structure TRANSACTION ************************************************************************************** ** begin_transaction : <name> Execute Transaction with : < conditions> ---> STOP begin_dialog ** instructions Windows End_Dialog begin_dialog ---> N dialog ** instructions Windows End_Dialog
Begin_Initialize ----> Before OpendDialog/ShowDialog ** Instructions... End_Initialize OpendDialog/ShowDialog(<Name1>, <Name2....) Instructions... Conditions etc.. ** or ** Begin_Message_Dialog(<Name1>)::OnMoveCursor(void) ** Instructions... Conditions etc.. End_Message_Dialog ** Begin_Message_Dialog(<Name1>)::OnClickDialog(void) ** Instructions... Conditions etc.. ** End_Message_Dialog ** Instructions... Conditions etc.. ** End_Message_Dialog Begin_Message_Dialog(<Name1>)::OnClickMenuSelect(void) End_transaction
** **************************************************************************************** ** FORM 3 :Object : en cours de réalisation ** **************************************************************************************** /* referentiel de l'objet CLIENT */ /* les commentaires sont ligne par ligne */ CLASS client export : NUMCLI string( 006) key UNIQUE /* num,ro client */ DAT_CR date
RAISOC string (030) ADRESS string (025) ADRCP string ( 045) ADRVI string( 020 ) NUMTEL instSTr ( 008 ) COUT01 amount COUT02 amount SLDCDC amount TYPCLI string(100) TYPEA status[1,2,3,4] TYPLIB function string ( 015 ) create procedure TOTO delete procedure standard inquire procedure standard update procedure standard end_export procedure : TOTO begin require TYPCLI ^VOID ; default : TYPEAB := "1" ; wnt := 1000 * 2 / 4 ; end_begin end_procedure
end_class
Bergougnoux Consulting 14 rue Jean Moulin 37550 St Avertin, Tours FRANCE. Copyright (c) 2001-2004 Enduser4gl, Tous droits réservés. All rights reserved fax : 00 33 2 47 28 58 19 |
|
|