Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!ncar!noao!arizona!robert From: robert@arizona.edu (Robert J. Drabek) Newsgroups: comp.os.vms Subject: Re: pascal strings Message-ID: <5302@megaron.arizona.edu> Date: 3 May 88 04:11:16 GMT References: <8805021136.AA05274@decwrl.dec.com> <2834@bsu-cs.UUCP> Organization: U of Arizona CS Dept, Tucson Lines: 28 Summary: question In article <2834@bsu-cs.UUCP>, cfchiesa@bsu-cs.UUCP (Christopher Chiesa) writes: : In article <8805021136.AA05274@decwrl.dec.com>, pfister_rob@rangly.dec.com (full moon today) writes: : : > TYPE : > STRING=VARYING[255] OF CHAR; : > VAR : > bar:STRING:='blah blah blah'; : > PROCEDURE foo(line:STRING); : > . : > v := LENGTH(line); (* if I wanna know the length of the string...*) : : I just wanted to point out that in this context, the Vax Pascal LENGTH function : does NOT return the contents of the varying_string ".length" field. It returns : the DECLARED SIZE of the particular variable, in this case the value 255, re- : gardless of the number of "valid characters" actually in the string. : Why don't I see this? I've used this fairly often and it seems I always came up with the number of valid characters. -- Robert J. Drabek Department of Computer Science University of Arizona Tucson, AZ 85721