Search the web
Sign In
New User? Sign Up
blassic · Blassic, the Classic Basic.
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Possible to return values?   Message List  
Reply | Forward Message #223 of 233 |
Re: Possible to return values?

--- In blassic@yahoogroups.com, "cybermonkey342" <mmangold@...> wrote:

> I just wanted to know if it is possible to get values with the SHELL command?
For example if I am using SHELL ("zenity") can the returned value be stored?

The return code of the last command executed is stored on sysvar 24. Try this
(in a system with a sh-like shell):

result = sysvarptr + 24
shell "return 1"
print peek(result)
shell "return 42"
print peek(result)

See http://blassic.org/sysvar.html for information on system variables.

> BTW: Nice to see there are still updates for Blassic so this lovely BASIC
dialect isn't dead for now ...

Is always nice to see there are people interested in old Basic dialects, and in
Blassic in particular :)





Fri May 8, 2009 3:24 pm

not_found_bl...
Offline Offline
Send Email Send Email

Forward
Message #223 of 233 |
Expand Messages Author Sort by Date

Hi, I just wanted to know if it is possible to get values with the SHELL command? For example if I am using SHELL ("zenity") can the returned value be stored? ...
cybermonkey342
Offline Send Email
May 8, 2009
2:43 pm

... The return code of the last command executed is stored on sysvar 24. Try this (in a system with a sh-like shell): result = sysvarptr + 24 shell "return 1" ...
not_found_blassic
not_found_bl...
Offline Send Email
May 8, 2009
3:24 pm

... command? For example if I am using SHELL ("zenity") can the returned value be stored? ... variables. ... Okay. That's what I wanted to know, thank you. But...
cybermonkey342
Offline Send Email
May 8, 2009
8:48 pm

... Using the SHELL command no, but you can use POPEN. For example: popen "ls" for input as #1 while not eof(#1) line input #1, l$ print l$ wend close #1 ... ...
not_found_blassic
not_found_bl...
Offline Send Email
May 11, 2009
2:15 pm
< Prev Topic  |  Next Topic >
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help