Hello List,
I badly need your help for i'm going totally nuts right now. I m trying to use a [textfile] to save a series of values. I have 16 lines of 12 integers to save each time (each txt file should only have 16 lines by 12 numbers). The way i 'm going about performing this awfully difficult task is as follows:
Now, the issue is that i know for sure that what comes out of the [add 0 0 0 0( is right (i check with a print in the console), yet [textfile] freaks out somehow and consistently saves the previous list to the current txt file. Say, i have 16 lines of 0's. If i write to textfile1.txt, i will not get 16 lines of 0's, even though that's what i'll have printed in the console. Now if i change this to 16 lines of 1's, and if i write to textfile2.txt, i will get all 0's in textfile2.txt, and 1's in the console.
I just don't know what's happening here. I checked that the way i gather the integers to be saved is right. The only solution that i can think of at the moment would be to systematically write to two files, the first of which would be useless. I know there has to be something cleaner. I guess i don't really understand how [textfile] works!
Pierre
It's funny how small victories over oneself can make one's day! That's alright, i 've just found out that all i need to do i send the [write( message last. Sorry...
Pierre
2010/7/18 Pierre Massat pimassat@gmail.com
Hello List,
I badly need your help for i'm going totally nuts right now. I m trying to use a [textfile] to save a series of values. I have 16 lines of 12 integers to save each time (each txt file should only have 16 lines by 12 numbers). The way i 'm going about performing this awfully difficult task is as follows:
- I first send a [write C:/....txt( to [texfile]
- Then i send a [clear( to [textfile]
- And finally i send my 16 lines using a [add 0 0 0 0 0 0.....0(
Now, the issue is that i know for sure that what comes out of the [add 0 0 0 0( is right (i check with a print in the console), yet [textfile] freaks out somehow and consistently saves the previous list to the current txt file. Say, i have 16 lines of 0's. If i write to textfile1.txt, i will not get 16 lines of 0's, even though that's what i'll have printed in the console. Now if i change this to 16 lines of 1's, and if i write to textfile2.txt, i will get all 0's in textfile2.txt, and 1's in the console.
I just don't know what's happening here. I checked that the way i gather the integers to be saved is right. The only solution that i can think of at the moment would be to systematically write to two files, the first of which would be useless. I know there has to be something cleaner. I guess i don't really understand how [textfile] works!
Pierre
Le 18/07/2010 13:45, Pierre Massat a écrit :
Hello List,
I badly need your help for i'm going totally nuts right now. I m trying to use a [textfile] to save a series of values. I have 16 lines of 12 integers to save each time (each txt file should only have 16 lines by 12 numbers). The way i 'm going about performing this awfully difficult task is as follows:
- I first send a [write C:/....txt( to [texfile]
- Then i send a [clear( to [textfile]
- And finally i send my 16 lines using a [add 0 0 0 0 0 0.....0(
you're doing it wrong.
c
Now, the issue is that i know for sure that what comes out of the [add 0 0 0 0( is right (i check with a print in the console), yet [textfile] freaks out somehow and consistently saves the previous list to the current txt file. Say, i have 16 lines of 0's. If i write to textfile1.txt, i will not get 16 lines of 0's, even though that's what i'll have printed in the console. Now if i change this to 16 lines of 1's, and if i write to textfile2.txt, i will get all 0's in textfile2.txt, and 1's in the console.
I just don't know what's happening here. I checked that the way i gather the integers to be saved is right. The only solution that i can think of at the moment would be to systematically write to two files, the first of which would be useless. I know there has to be something cleaner. I guess i don't really understand how [textfile] works!
Pierre
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list