Platform Framework
R24 AMR | Min(s) read

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.

  1. Expand the project. Right-click the BASIC source folder and click New > T24 routine.

  2. 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.

  3. Click Finish. Your file is created in the list of basic programs.
  4. 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.

Right-clicking on this vertical ruler bar on the left of the code will also give you the option to show the line numbers.

Copyright © 2020- Temenos Headquarters SA

Published on :
Monday, May 27, 2024 5:07:21 PM IST