You do not like to return a varying[MAXLEN] of char and waste some bytes of memory for storage?
That's OK with me; but HOW do I define it in the function definition....
But this doesn't help.
Now I defined the function as:
Code: Select all
function IntToStr (I: integer; z:boolean:=false): varying [12] of char;
because the result will - incluiding sign - never exceed 12 characters.
However, VMSIDE isn't happy with that:
at "["
Code: Select all
"mismatched input ';' expecting {';', END}"
at function "end;" line
nor is the compiler:
Code: Select all
%PASCAL-E-SYNTYPID, Syntax: type identifier expected
at "varying".
Added
Code: Select all
type: T_TxtNum = varying[12] of char;
and used that as type definition.
Code: Select all
function IntToStr (I: integer; z:boolean:=false): T_TxtNum;
(Disgressing:
Why VMS-IDE tells me:
is (I guess) a bug in VMS-IDE (it won't disappear unless I close the whole session...)
)
but as it turned out, was indeed the solution (It's been many years I worked so regularly with VMS Pascal - now being spoiled using Delphi on Windows for quite some time... That might be the problem
)