Login Register






Must be the Ganja filter_list
Author
Message
RE: Must be the Ganja #11
(04-15-2012, 08:13 PM)Dapaus Wrote: @PhazeShift: at the end of the code there is "pause && goto :eof"
But where exactly is :eof going to?

That's exactly what I was wondering but I decided not to ask it.
[Image: twgFe.jpg]
~So don’t worry about tomorrow, for tomorrow will bring its own worries. Today’s trouble is enough for today.

Reply

RE: Must be the Ganja #12
(04-15-2012, 08:13 PM)Dapaus Wrote: @PhazeShift: at the end of the code there is "pause && goto :eof"
But where exactly is :eof going to?

It's a default standard for batch scripters to use, habit for me when I pipe arguments to calling blocks in batch, as I may want to call it but never actually go to the code, and exit when i'm done with the main bit before unnecessarily going to those calls.
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply

RE: Must be the Ganja #13
(04-16-2012, 05:11 AM)PhazeShift Wrote: It's a default standard for batch scripters to use, habit for me when I pipe arguments to calling blocks in batch, as I may want to call it but never actually go to the code, and exit when i'm done with the main bit before unnecessarily going to those calls.

So it actually go to a code block that doesn't exist and quits?
[Image: Signature.png]

Chek Out My Tutorials
| Set Up A Pentest Lab | How To Make Bitcoins |

Reply

RE: Must be the Ganja #14
(04-16-2012, 06:36 PM)Dapaus Wrote:
(04-16-2012, 05:11 AM)PhazeShift Wrote: It's a default standard for batch scripters to use, habit for me when I pipe arguments to calling blocks in batch, as I may want to call it but never actually go to the code, and exit when i'm done with the main bit before unnecessarily going to those calls.

So it actually go to a code block that doesn't exist and quits?

:nono: No... It's a command which became available in Windows versions of NT 4 and above which indicates the end of a function or subroutine and returns the calling code to the label of that function.

Example:
Code:
@echo off call :setvar 10 echo Stored Variable... goto test :setvar set /a num=(%1) + 1 goto :eof :test echo This is your new var... %num% pause
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply

RE: Must be the Ganja #15
(04-17-2012, 01:01 AM)PhazeShift Wrote: :nono: No... It's a command which became available in Windows versions of NT 4 and above which indicates the end of a function or subroutine and returns the calling code to the label of that function.

Example:
Code:
@echo off call :setvar 10 echo Stored Variable... goto test :setvar set /a num=(%1) + 1 goto :eof :test echo This is your new var... %num% pause

Okay thanks, I understand it now Biggrin
[Image: Signature.png]

Chek Out My Tutorials
| Set Up A Pentest Lab | How To Make Bitcoins |

Reply

RE: Must be the Ganja #16
(04-17-2012, 03:52 PM)Dapaus Wrote:
(04-17-2012, 01:01 AM)PhazeShift Wrote: :nono: No... It's a command which became available in Windows versions of NT 4 and above which indicates the end of a function or subroutine and returns the calling code to the label of that function.

Example:
Code:
@echo off call :setvar 10 echo Stored Variable... goto test :setvar set /a num=(%1) + 1 goto :eof :test echo This is your new var... %num% pause

Okay thanks, I understand it now Biggrin

As well as I do I never knew that Smile
[Image: twgFe.jpg]
~So don’t worry about tomorrow, for tomorrow will bring its own worries. Today’s trouble is enough for today.

Reply

RE: Must be the Ganja #17
"Functions" in batch are very useful if you know how to send the arguments to a label with CALL
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply