Strange things...in PROGRESS 4GL
1) Logical variables can take 3 values yes,no & ? :lol:
DEFINE VARIABLE x AS LOGICAL INITIAL yes.
DEFINE VARIABLE y AS LOGICAL.
DEFINE VARIABLE z AS LOGICAL INITIAL ?.
DISPLAY x y z.
2) Streams can take the same name. :lol:
DEFINE STREAM str.
DEFINE STREAM str.
3) BREAK BY can also take the following form
BREAK BY [=<constant>|<variable>]
DEFINE VARIABLE lcHolder AS CHARACTER INITIAL <blah>.
FOR EACH <table-name> NO-LOCK
BREAK BY <field-name> = lcHolder:
DISPLAY <field-name>.
/*
The above display statement will always shows <blah> value at last.
*/
END.
4) FOR EACH <table-name> NO-LOCK:
RUN a.
END.
PROCEDURE a:
DISPLAY <field-name-of-the-above-table>.
/* Doesnt work it says it needs table name as prefix even though the procedure is excecuted within the scope of the buffer */
END PROCEDURE.
1) Logical variables can take 3 values yes,no & ? :lol:
DEFINE VARIABLE x AS LOGICAL INITIAL yes.
DEFINE VARIABLE y AS LOGICAL.
DEFINE VARIABLE z AS LOGICAL INITIAL ?.
DISPLAY x y z.
2) Streams can take the same name. :lol:
DEFINE STREAM str.
DEFINE STREAM str.
3) BREAK BY can also take the following form
BREAK BY [=<constant>|<variable>]
DEFINE VARIABLE lcHolder AS CHARACTER INITIAL <blah>.
FOR EACH <table-name> NO-LOCK
BREAK BY <field-name> = lcHolder:
DISPLAY <field-name>.
/*
The above display statement will always shows <blah> value at last.
*/
END.
4) FOR EACH <table-name> NO-LOCK:
RUN a.
END.
PROCEDURE a:
DISPLAY <field-name-of-the-above-table>.
/* Doesnt work it says it needs table name as prefix even though the procedure is excecuted within the scope of the buffer */
END PROCEDURE.