TNS/E Native Application Conversion Guide
Converting TAL to pTAL
TNS/E Native Application Conversion Guide—529659-003
5-2
Required Changes
•
Remove CODE, STACK, and STORE statements.
•
Rewrite code that uses G, S, or L-relative addresses.
pTAL does not support embedded SQL statements. To convert a TAL program with
embedded SQL to pTAL, write C functions that contain the embedded SQL statements
and call the C functions from pTAL.
Many TAL programs require few changes to create valid pTAL programs. However,
TAL programs that make use of low-level TNS architecture features might require
significant changes.
Use the pTAL compiler’s syntax checking option to produce a detailed list of TAL
constructs that must be changed to convert TAL code to pTAL code. In Example 5-1,
the variable I must be declared as a WADDR.
In some cases, you can maintain one set of source code for both TAL and pTAL. See
Maintaining Common Source Code for TNS and TNS/E Native Compilers on page 2-3
for details.
This manual does not describe the language-specific tasks required to convert from
TAL to pTAL. For detailed TAL-to-pTAL conversion information, see the appropriate
manual in the pTAL documentation set:
Example 5-1. pTAL Compiler Listing With Syntax Checking
PROC myproc;
BEGIN
INT I;
*** Error: ^
--> I is declared to have type INT(16), but is used later as WADDR
[error 01023].
INT .p1;
I := @p1;
Manual Description
pTAL Guidelines for TAL Programmers
Describes how to write TAL code that can be
converted to pTAL with minimal changes. Lists
the major differences between TAL and pTAL.
pTAL Conversion Guide
Describes the differences between TAL and
pTAL. Explains in detail how to covert TAL
programs to pTAL.
pTAL Reference Manual
Describes the syntax of the pTAL language.
Explains how to run the pTAL compiler.










