FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Syntax
(Moderators: fry, REAS)
   Array confusion (newbie)
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: Array confusion (newbie)  (Read 304 times)
Jean Jacques
Guest
Email
Array confusion (newbie)
« on: Jan 13th, 2004, 6:12pm »

Hello,
I can't find the way for storing data into arrays, i've been looking at the reference and learning part but i still can't get any solutions.
You're help is welcome.
 
What i want to do is reading a .txt file on the web and store each line into an array.
 
Thanks
 
Jean Jacques
 
Koenie

170825270170825270koeniedesign WWW Email
Re: Array confusion (newbie)
« Reply #1 on: Jan 13th, 2004, 8:23pm »

There is one function in Proce55ing that does exactly that. Look in the reference for loadStrings(): http://proce55ing.net/reference/loadStrings_.html
 
Koenie
 

http://koeniedesign.com
Jean Jacques
Guest
Email
Re: Array confusion (newbie)
« Reply #2 on: Jan 14th, 2004, 1:39pm »

Thank you very much for your help, now it works.
This is what i've done
 
 
 
 
size(640, 480);  
background(0);  
stroke(153, 153, 0);  
 
 
BFont fontA = loadFont("Meta-Bold.vlw.gz");  
textFont(fontA, 33);  
 
int x1 = 0;
int y1 = 0;
 
 
String lines[] = loadStrings("http://tecfaseed.unige.ch/door/modules/Shoutbox/show.php");  
for (int i=0; i < lines.length; i++) {  
}  
 
for(int j=0; j<lines.length; j=j+1) {  
y1 = y1 + 30;
x1 = x1 + 3;
textSize(x1);
 text(lines[j],-300,y1);
}
 
 
Now i must work on the code's structure, because i know that what i've made is a very dirty piece of code : )
 
Pages: 1 

« Previous topic | Next topic »