$result: Difference between revisions

From Scriptwiki
Jump to navigation Jump to search
Daveoh (talk | contribs)
mNo edit summary
m forgot wiki links
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
Stores the value returned to a calling routine by the [[Return|/return]] command.
Stores the value returned to a calling routine by the [[Return|/return]] command.
== Example ==
alias a {
  b
  [[echo]] -ag Returned value from /b command: $result
}
alias b
  [[return]] buzzy B
}
With the above script loaded when we issue the /a alias, we'll get echo'd
Returned value from /b command: buzzy B


== See Also ==
== See Also ==

Latest revision as of 09:51, 6 April 2008

Stores the value returned to a calling routine by the /return command.

Example

alias a {
  b
  echo -ag Returned value from /b command: $result
}
alias b 
  return buzzy B
}

With the above script loaded when we issue the /a alias, we'll get echo'd

Returned value from /b command: buzzy B

See Also