home bbs files messages ]

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,889 of 68,980   
   Kenny McCormack to dallas@texas.usa   
   Calling "internal" subroutines in a batc   
   30 Jun 22 12:11:05   
   
   From: gazelle@shell.xmission.com   
      
   In article , Dallas   wrote:   
   ...   
   > > So I nested 3 levels deep and came back out of each level as expected.   
   >   
   >   
   >I had no idea you could have internal subroutines like that.   
   >   
   >You can even use recursion.   
   >   
   >Thanks for the example!   
      
   Note that, in the olden days (COMMAND.COM), you had to do this yourself -   
   brute force.  I often coded it like:   
      
   if %1X==L10X goto L10   
   echo main routine - Now calling L10 routine...   
   %0 L10   
   goto the_end   
   :L10   
   echo here we are in L10 subroutinue...   
   :the_end   
      
   I assume that the powers that be at MS noticed that people were doing this   
   sort of thing, so they codified it into the language (in CMD.EXE versions   
   of the batch language).   
      
   --   
   "He is exactly as they taught in KGB school: an egoist, a liar, but talented -   
   he   
   knows the mind of the wrestling-loving, under-educated, authoritarian-admiring   
   white male populous."   
       - Malcolm Nance, p59. -   
      
   --- 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