Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6154279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:14:14+00:00 2026-05-23T20:14:14+00:00

When using the CALL command to call a label in a batch script, and

  • 0

When using the CALL command to call a label in a batch script, and you end the sub-routine with GOTO:eof, what happens from there? Does it return back to where the sub-routine’s CALL is located? Or does it continue on after the location of the call script?

For example:

ECHO It's for my college fund.
CALL :OMGSUB
ECHO *runs away and cries like a little girl*

:OMGSUB
ECHO Your mom goes to college.
GOTO:eof

ECHO *picks up jewelry box*

After GOTO:eof which line will it echo next?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T20:14:15+00:00Added an answer on May 23, 2026 at 8:14 pm

    Why not just run it and see for yourself? I saved your script to a batch file called foo.bat, and I changed the Your mom goes to college. to have an echo in front.

    C:\temp>foo
    
    C:\temp>ECHO It's for my college fund.
    It's for my college fund.
    
    C:\temp>CALL :OMGSUB
    
    C:\temp>echo Your mom goes to college.
    Your mom goes to college.
    
    C:\temp>GOTO:eof
    
    C:\temp>ECHO *runs away and cries like a little girl*
    *runs away and cries like a little girl*
    
    C:\temp>echo Your mom goes to college.
    Your mom goes to college.
    
    C:\temp>GOTO:eof
    
    C:\temp>
    

    So it’s easy to see that after the OMGSUB is called, it

    1. Goes to the end of file.
    2. Then it returns to the line right afer the CALL :OMGSUB and echos the “runs away” line
    3. Then it echos the Your Mom line again
    4. Then it goes to end of file and terminates
    5. The line echo *picks up jewewlry box* never gets reached.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Python script I recently wrote that I call using the command
I'm trying to run a command from a window project using system() call but
Using the following line in a batch script to call thunderbird and compose an
I call ant command in my ruby script (on Windows XP) using %x[]. I
How exactly using VB6 can I can call any Windows shell command as you
I'm parsing XML results from an API call using PHP and xpath. $dom =
I have a problem while executing a bash script from C++ using the system
I am new to C#, and I am trying to call 'cls' command using
I am trying to call a stored procedure using native query call from an
I am using wix and want to call command line after installation. How can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.