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 to share photos of your group with the world? 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 #224 of 233 |
Re: Possible to return values?


--- In blassic@yahoogroups.com, "not_found_blassic" <julian.notfound@...> wrote:
>
> --- 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.
>
Okay. That's what I wanted to know, thank you. But it is obviously not possible to return the value of a string?
 
> > 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 :)
>
Well, I don't know why, but I am trying that modern object oriented BASICs and nothing ever works but sitting down with Blassic, I can start hacking programms in my keyboard. ;-)
Well, I learned coding with a Commodore 64 but seem never learned anything more ...
By the way I posted at forum.basicprogramming.org how to create a PDF file with Blassic under Linux. ;-)
The link: blassic forum entry 


Fri May 8, 2009 8:48 pm

cybermonkey342
Offline Offline
Send Email Send Email

Forward
Message #224 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