Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!hao!gatech!rayssd!d2b From: d2b@rayssd.ray.com (Donald A. Borsay) Newsgroups: comp.os.vms Subject: Re: FORTRAN Zero Length Strings Message-ID: <1832@rayssd.ray.com> Date: 24 Feb 88 17:51:39 GMT References: <880217133134.2100823c@Iago.Caltech.Edu> Sender: d2b@rayssd.ray.com (Donald A. Borsay @ Raytheon Company, Portsmouth RI) Reply-To: d2b@rayssd.RAY.COM (Donald A. Borsay) Organization: Raytheon Company, Portsmouth RI Lines: 30 Summary: Double single quote only valid in a quoted string In article <880217133134.2100823c@Iago.Caltech.Edu> zar@IAGO.CALTECH.EDU (Dan Zirin) writes: >Another reason you can't type > VARIABLE = '' >is because two single quotes in VAX FORTRAN imply the string "'" (one >single quote. Even if DEC decided to allow zero length strings, the >above step would imply an unclosed string or "missing delimiter" error. Since you use a literal in your example, I'll limit my discussion to parsing a . Currently: = *and* *and* = *1_to_many* = *or* When allowing zero length strings: = *and* *and* = *0_to_many* = *or* The key is, the compiler looks ahead one character. After seeing only two single quotes in a , the next character would have to be : (1) another single quote (thus continuing the token), (2) whitespace (ending the token), or (3) the beginning of a valid token (ending the token). -- Don |Raytheon Company, Submarine Signal Division, Portsmouth, RI Borsay |ARPAnet: d2b%rayssd.RAY.COM@a.cs.uiuc.edu |UUCPmail: {allegra, decvax!brunix, linus!raybed2}!rayssd!d2b