Table of Contents

call

call - a statement that transfers control to a subroutine

syntax

call name[(argumentlist)]

See also decl, sub

details

In a call statement, the keyword call is optional. However, if a subroutine is called explicitly with the keywordcall, the parentheses indicating the optional argumentlist can be omitted if no argument is passed. The keyword call has no influence on subroutine declaration.

example

' SharpBASIC call programming example
' -----------------------------------
incl "lib/sys.sbi";

decl sub printTitle(t:str);

const title = "a new programming language.";

main do
  call printTitle(tcase(title));
end

sub printTitle(t:str)
do
  print(t);
end
Output:

A New Programming Language