It would work with goto statement where goto stores it's line number on
stack say and jump to label and when return statement is will return to the
line number plus one on the stack
On May 17, 2013 12:51 PM, "Rugxulo" <rugx...@gmail.com> wrote:

> Hi,
>
> On Fri, May 17, 2013 at 2:34 PM, Bernd Blaauw <bbla...@home.nl> wrote:
> > Chris Evans schreef op 17-5-2013 21:23:
> >
> >> I wonder if a return command /instruction can be added so batch files
> >> can have function like behavior ...
> >
> > Try 4DOS 8.00 as command interpreter, it's freeware nowadays (with
> > sources available). Things like GOSUB are supported.
>
> Oh, if all you want are user-callable functions a la BASIC's GOSUB +
> RETURN, you can easily fake those in any DOS shell:
>
> @echo off
> if "%1"=="-greet" goto greet
> for %%a in (bernd chris rugxulo) do call %0 -greet %%a
> goto end
> :greet
> shift
> echo ===============================
> echo Hello, %1 !
> echo ===============================
> echo.
> :end
>
>
> ------------------------------------------------------------------------------
> AlienVault Unified Security Management (USM) platform delivers complete
> security visibility with the essential security capabilities. Easily and
> efficiently configure, manage, and operate all of your security controls
> from a single console and one unified framework. Download a free trial.
> http://p.sf.net/sfu/alienvault_d2d
> _______________________________________________
> Freedos-devel mailing list
> Freedos-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-devel
>
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to