Writing a Basic Program with Eclipse
This section provides a demo of a BASIC program in TAFJ Eclipse editor.
You can write a basic program with Eclipse using the following procedure.
- Expand the project. Right-click the BASIC source folder and click New > T24 routine.
- Specify a valid BASIC file name and extension (.b) (for example MY.FIRST.PROGRAM.b).It is not mandatory to specify the .b extension, but if you do not specify, then you will have to specify the extension with all the editors you want to edit your file.
- Click Finish. Your file is created in the list of basic programs.
- Repeat steps 1 to 3 for MY.FIRST.SUBROUTINE.b.
Adding Breakpoint
Below are the source codes of two programs that you created in the above section.
MY.FIRST.PROGRAM.b
PROGRAM MY.FIRST.PROGRAM COM /MY.GRP/MY.COMMON A = 10 B = "Hello" CRT "A = " : A CRT "B = " : B CALL MY.FIRST.SUBROUTINE(B) CRT MY.COMMON END
This routine prints A and B and it calls MY.FIRST.SUBROUTINE with an argument B.
MY.FIRST.SUBROUTINE.b
SUBROUTINE MY.FIRST.SUBROUTINE(PARAM) COM /MY.GRP/MY.COMMON CRT "PARAM = " : PARAM MY.COMMON = "A NEW VALUE" CRT MY.COMMON RETURN
This subroutine displays PARAM and MY.COMMON variable.
Add a breakpoint on the line 4 of MY.FIRST.PROGRAM.b. To do this, just double-click in the vertical ruler bar on the left of the code.
In this topic