Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
isa.hay1
isa.hay1's Profile
1
Posts
1
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Converting strings to double
[4 Replies]
22-Sep-2013 01:11 PM
Forum:
Programming Questions
Hi, new to processing.
I am trying to convert user input using strings into double. Any ideas on house to do this?
Or is there a better way to accept user input?
double user_temp;
double user_wind_speed;
PFont f;
// Variable to store text currently being typed
String typing = "";
// Variable to store saved text when return is hit
String saved = "";
void setup() {
size(600,450);
f = createFont("Arial",15,true);
}
void draw() {
background(255);
int indent = 25;
// Set the font and fill for text
textFont(f);
fill(0);
// Display everything
text("Click in this box and start entering the values. \nHit return to save what you typed. \n Enter the Air Temperature:", indent, 40);
text(typing,indent,100);
text(saved,indent,130);
Thanks.
«Prev
Next »
Moderate user : isa.hay1
Forum