[PD] [textfile], DeLorean, and the effects of time travel on mental health.

cyrille henry ch at chnry.net
Sun Jul 18 13:58:49 CEST 2010



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:
> 1) I first send a [write C:/....txt( to [texfile]
> 2) Then i send a [clear( to [textfile]
> 3) And finally i send my 16 lines using a [add 0 0 0 0 0 0.....0(
you're doing it wrong.

1) clear the textfile
2) send the value to the textfile
3) write the textfile to to the HD

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 at iem.at mailing list
> UNSUBSCRIBE and account-management ->  http://lists.puredata.info/listinfo/pd-list



More information about the Pd-list mailing list