Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Simple Ping command: Single line command + arguments
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
izizi




PostPosted: Thu Mar 17, 2011 11:45 pm   Post subject: Simple Ping command: Single line command + arguments

What is it you are trying to achieve?
I'm trying to make a sample program similar to the usual 'ping' command on a typical windows or linux machine.


What is the problem you are having?
I can get the user to input something similar to "ping 127.0.0.1 -a" and store it in a variable called 'command' but when I try and display 'command' again, I only get the text before the space; It won't keep the '127.0.0.1 -a'. Is there a way to have the user enter the entire string instead of prompting for every parameter of ping?


Describe what you have tried to solve this problem
I have tried to use commands to separate the input into multiple variables but because it doesn't store anything after the space in the variable, none of them work.


Please specify what version of Turing you are using
version 4.1.1
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Fri Mar 18, 2011 12:20 am   Post subject: RE:Simple Ping command: Single line command + arguments

documentation -- get
code:

get line_variable:*
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: