Post a reply
Username:
Note:If not registered, provide any username. For more comfort, register here.
Subject:
Message body:
Enter your message here, it may contain no more than 60000 characters. 

Smilies
:D :) :( :o :shock: :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:
Font size:
Font colour
Options:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Confirmation of post
To prevent automated posts the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.
Confirmation code:
Enter the code exactly as it appears. All letters are case insensitive, there is no zero.
   

Topic review - User Input
Author Message
  Post subject:  Re: User input  Reply with quote
To get user input from a Singular procedure
you should use the read command:
string s=read(""); // the empty string refers to the user keyboard
This call will return exactly one line of user input as an unchanged string.
Post Posted: Mon Jan 08, 2007 8:45 pm
  Post subject:  User Input  Reply with quote
I would just like to know how to take user input for the running Singular process. Let me make it more clear:
e.g. In most of the programs, we need something like this:
Code:
"Please enter value of x":
get_user_input(x)
do_some_process(x)
produce_output()
$

The best possible way I can see as of now is to write some C (or similar) wrapper code which will ask such questions and get the inputs, then store them in some temp text file, come back to Singular process, ask Singular to read that text file and delete it after you are done.

Please let me know, is there any other way within Singular itself?

With Regards

VInay Wagh
Post Posted: Tue Dec 19, 2006 5:21 pm


It is currently Fri May 13, 2022 10:59 am
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group