At my workplace, I started to learn TAL recently. I decided to write some simple example applications to get the hang of this language and its environment (TACL, GUARDIAN OS, etc). My current objective is to create a multi-file app.
My “util” file has a function term_write_int
, which takes an int
and writes it to the terminal:
?NOLIST, SOURCE $SYSTEM.SYSTEM.EXTDECS (
?CLOSE,
?MYTERM,
?OPEN,
?NUMOUT
?WRITE)
?LIST
?section term_write_int
?page "term_write_int"
!
! Write INT to terminal.
!
PROC term_write_int(num);
INT num;
BEGIN
INT filenum;
INT termname[0:11];
INT length := 11;
STRING text[0:10];
CALL NUMOUT (text, num, 10, 11);
CALL MYTERM (termname);
CALL OPEN (termname, filenum);
CALL WRITE (filenum, text, length);
CALL CLOSE (filenum);
END; !term_write_int
My MAIN file adds 2 numbers together and pass the result to the term_write_int
function from, the util file:
?NOLIST, SOURCE $SYSTEM.SYSTEM.EXTDECS (INITIALIZER)
?LIST
?NOLIST, SOURCE =util(term_write_int)
PROC myproc MAIN;
BEGIN
CALL INITIALIZER;
INT num1 := 4;
INT num2 := 7;
INT sum;
sum := num1 + num2;
CALL term_write_int(sum);
END; !MYPROC
Originally I wanted to use the BIND
TACL command, but for that, I need to compile the files separatelly, and when I try to compile my MAIN file I get the following error:
No file system DEFINE exists for this logical file name: =util
How should I resolve this?