|
|
Source code - File "language/c_getset"
|
1 @ dash &
2 @ language/c/get_set(int,Quantity,quantity)
3 @ language/c/get_set(double,Percentage,percentage)
|
|
Output of
"/opt/somusar/bin/tefigel language/c_getset"
|
1 static int quantity;
2
3 int getQuantity() {
4 return quantity;
5 }
6
7 void setQuantity( int v_quantity ) {
8 quantity = v_quantity;
9 }
10
11 static double percentage;
12
13 double getPercentage() {
14 return percentage;
15 }
16
17 void setPercentage( double v_percentage ) {
18 percentage = v_percentage;
19 }
20
|
|
C get/set subroutine - File "language/c/get_set"
|
1 @ interface(TYPE,IdId,idId)
2 static TYPE idId;
3
4 TYPE get&IdId() {
5 return idId;
6 }
7
8 void set&IdId( TYPE v_&idId ) {
9 idId = v_&idId;
10 }
11
|
|
|
Source code - File "language/vbasic"
|
1 @ set msg=Hello!
2 ' Print out a message
3 MsgBox "The message is: msg"
4
|
|
Output of
"/opt/somusar/bin/tefigel language/vbasic"
|
1 ' Print out a message
2 MsgBox "The message is: Hello!"
3
|
|
|
Source code - File "language/cobol"
|
1 @ set program_name=PROGRAM 0
2 @ set hello_message=Hello, world!
3 ****************************************************************
4 PROCEDURE DIVISION.
5 P0.
6 ** print a message
7 DISPLAY 'program_name: hello_message'.
8
|
|
Output of
"/opt/somusar/bin/tefigel language/cobol"
|
1 ****************************************************************
2 PROCEDURE DIVISION.
3 P0.
4 ** print a message
5 DISPLAY 'PROGRAM 0: Hello, world!'.
6
|
|
|
Source code - File "language/RPG"
|
1 @ set msg=Unknown Code
2 * Display an error message
3 Dtext m msgtext('msg')
|
|
Output of
"/opt/somusar/bin/tefigel language/RPG"
|
1 * Display an error message
2 Dtext m msgtext('Unknown Code')
|
|
[Previous chapter]
[Next chapter]
[Back to top]
|
|