Re: AGT Version 1.83
18 Aug 1995 15:41:35 -0400
In article <40o8tf$93n@news.xmission.com>,
Joe Schlimgen <macron@xmission.com> wrote:
}In article <Pine.SOL.3.91.950813160611.3331E-100000@xmission.xmission.com>,
}nick@xmission.xmission.com says...
}>
}>
}>
}>On 11 Aug 1995, Joe Schlimgen wrote:
}>
}>> The biggest problems I had to worry about were strings and arrays. Pascal
}can
}>> base arrays from [min..max] and C++ always bases them from 0 -- hence the
}>> PArray<class T, int min, int max> template. Strings were a bit trickier --
}the
}>> ANSI string class works well, but I hade to work on the i/o to make it
}>> fixed-length (which Pascal appears to have -- more research is needed
}there,
}>> any answers from the vast and unpaid research dept?).
}>
}>Pascal DOES NOT have fixed length strings, strings are kinda like arrays,
}>this is how it works:
}>
}[good examples snipped]
}
}Right, my original message was misleading on that part. What I meant was that
}the _i/o_ of those strings appears to be fixed length. It appears that enough
}memory is allocated to each string for its maximum length plus one (the first
}byte being the length of the string, thereby limiting the string to 255
}characters plus the length byte making a total of 256 bytes of memory).
The I/O of AGT strings is as fixed-length records of string max length
+ 1. You are exactly correct. This is a feature of whatever compiler
AGT is using, not of AGT itself. This is a real pain when trying to
port it.
--
Matthew T. Russotto russotto@pond.com russotto@his.com
"Extremism in defense of liberty is no vice, and moderation in pursuit
of justice is no virtue."