How to resolve the algorithm Program name step by step in the FreeBASIC programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Program name step by step in the FreeBASIC programming language

Table of Contents

Problem Statement

The task is to programmatically obtain the name used to invoke the program. (For example determine whether the user ran "python hello.py", or "python hellocaller.py", a program importing the code from "hello.py".) Sometimes a multiline shebang is necessary in order to provide the script name to a language's internal ARGV. See also Command-line arguments Examples from GitHub.

Let's start with the solution:

Step by Step solution about How to resolve the algorithm Program name step by step in the FreeBASIC programming language

Source code in the freebasic programming language

' FB 1.05.0 Win64

Print "The program was invoked like this => "; Command(0) + " " + Command(-1)
Print "Press any key to quit"
Sleep

  

You may also check:How to resolve the algorithm Generate random chess position step by step in the Ruby programming language
You may also check:How to resolve the algorithm Truncatable primes step by step in the Haskell programming language
You may also check:How to resolve the algorithm Loops/For step by step in the Sparkling programming language
You may also check:How to resolve the algorithm Fibonacci n-step number sequences step by step in the Run BASIC programming language
You may also check:How to resolve the algorithm Loops/Downward for step by step in the Fantom programming language