The LENGTH.I include file resides on the Kyan Pascal 2.x Disk 2. It includes on function:
- function LENGTH
Include file used to add LENGTH procedure to a Pascal program. To incorporate LENGTH into a program, copy the LENGTH.I file to the same disk that contains the Pascal source code that is attempting to use the LENGTH procedure.
Returns the integer length of a string.
Source Code
function length(var a1:string):integer;
var i:integer;
begin
i:=maxstring;
while ((a1[i] = ' ') and (i <> 1))
do i:=i-1;
length:=i;
end;
No comments:
Post a Comment