Differences

This shows you the differences between two versions of the page.

Link to this comparison view

ada.command_line [2012/01/14 20:33]
thomaslocke [Ada.Command_Line.Command_Name]
ada.command_line [2012/01/14 20:35] (current)
thomaslocke [Introduction]
Line 9: Line 9:
 > If the external execution environment supports passing arguments to a program, then Argument_Count returns the number of arguments passed to the program invoking the function. Otherwise it returns 0. The meaning of “number of arguments” is implementation defined. > If the external execution environment supports passing arguments to a program, then Argument_Count returns the number of arguments passed to the program invoking the function. Otherwise it returns 0. The meaning of “number of arguments” is implementation defined.
  
-Note the closing sentence: **The meaning of “number of arguments” is implementation defined**. What this means, is that you cannot trust a given argument string to yield the same result for all environments. //​Argument_Count//​ is highly dependant on factors such as OS, shell, and compiler.+Note the closing sentence: **The meaning of “number of arguments” is implementation defined**. What this means, is that you cannot trust a given argument string to yield the same result for all environments. //​Argument_Count//​ is highly dependant on factors such as operating system, shell, and compiler.
  
 ===== Using Ada.Command_Line ===== ===== Using Ada.Command_Line =====
Line 226: Line 226:
 //echo $?// outputs the exit code of the most recently executed program. On the first execution, we get a failure because no arguments are given. On the second execution, we get a success because exactly one argument is given. On the third execution, we get the special exit code 3 because more than one argument is given. //echo $?// outputs the exit code of the most recently executed program. On the first execution, we get a failure because no arguments are given. On the second execution, we get a success because exactly one argument is given. On the third execution, we get the special exit code 3 because more than one argument is given.
  
-[[Ada.Command_Line.Set_Exit_Status|Example Source]]+[[Ada.Command_Line.Set_Exit_Status Example Source]]
  

Navigation