Path: utzoo!mnetor!uunet!husc6!purdue!decwrl!rangly.dec.com!pfister_rob From: pfister_rob@rangly.dec.com (full moon today) Newsgroups: comp.os.vms Subject: pascal strings Message-ID: <8805021136.AA05274@decwrl.dec.com> Date: 2 May 88 14:30:00 GMT Organization: Digital Equipment Corporation Lines: 41 > decwrl!labrea!rutgers!elbereth.rutgers.edu!elkins writes >Is there a way in VAX Pascal to define a procedure that will take >a variable length quoted string as a parameter? >Example of what I want to do: > foo('This is a string of any length'); {User-written procedure foo} >Examples of what I am avoiding: > foo(PackedArrayName, StringLength); {Packed array and string length} > or > foo(String.Body, String.Length); {Record with packed array and integer} What I do is... 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...*) . . . Is this what you mean? Disclaimer: This posting was generated by random line noise, not by official consenus of my employer... |Robert Pfister Digital Equipment Corp |Email: Pfister_Rob%Dneast.dec@decwrl.dec.com