Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.msdos.batch.nt    |    Fun with Windows NT batch files    |    68,980 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 67,911 of 68,980    |
|    Dallas to John    |
|    Re: batch file structure    |
|    06 Jul 22 10:58:13    |
   
   From: dallas@texas.usa   
      
   On 7/5/2022 3:28 PM, Kerr-Mudd, John wrote:   
   > Mostly self-documented with a 'help' section   
   >   
   > rem {insert datestamp}   
   > if \%1==\ goto Usage   
   > ...   
   > ...   
   > goto end   
   > Usage:   
   > echo %0 is a program to ...   
   > echo Usage is %0 parm1 parm2 {parm3}   
   > echo e.g. %0 x y does action   
   > rem relies on (dependency) being accessible via path   
   >   
   >   
      
   Seeing your line coded as   
      
   if \%1==\ goto Usage   
      
   makes me curious as to how others code that.   
   I have been using   
      
   if [%1]==[] goto Usage:   
      
   because it reads well (to my eyes anyway)   
      
   Note that I also tack on a colon ( : ) after a label like Usage: in a goto   
   statement just so it   
   perfectly matches the label to jump to.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca