Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site decwrl.DEC.COM Path: utzoo!linus!decvax!decwrl!dec-rhea!dec-pixel!pwong From: pwong@pixel.DEC (Paul H. Wong, DPS/Graphics, 264-7918) Newsgroups: net.micro.pc Subject: Re: null as variable in batch file Message-ID: <1088@decwrl.DEC.COM> Date: Wed, 12-Feb-86 11:10:19 EST Article-I.D.: decwrl.1088 Posted: Wed Feb 12 11:10:19 1986 Date-Received: Thu, 13-Feb-86 20:26:44 EST Sender: daemon@decwrl.DEC.COM Organization: Digital Equipment Corporation Lines: 22 >foo %1 --how do I detect case where %1 is omitted, thus avoiding > an error? I've tried: > if %1=='' > if %1==' ' > if %1== > all to no avail. Any help or pointers would be appreciated. This seems to work for me: if Z%1==Z - Paul --------------------------------------------------------------------- Paul H. Wong Digital Equipment Corp. Merrimack, NH (603)-884-7918 ARPA: PWong%PIXEL.DEC@decwrl.arpa USENET: {allegra|decvax|ihnp4|ucbvax}!decwrl!dec-rhea!dec-pixel!pwong