Difference between revisions of "$result"

From Scriptwiki
Jump to: navigation, search
m (Added example)
m (forgot wiki links)
 
Line 4: Line 4:
 
  alias a {
 
  alias a {
 
   b
 
   b
   echo -ag Returned value from /b command: $result
+
   [[echo]] -ag Returned value from /b command: $result
 
  }
 
  }
 
  alias b  
 
  alias b  
   return buzzy B
+
   [[return]] buzzy B
 
  }
 
  }
 
With the above script loaded when we issue the /a alias, we'll get echo'd
 
With the above script loaded when we issue the /a alias, we'll get echo'd

Latest revision as of 10: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