From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
10-26-2008 10:06 AM
Am I correct in interpreting that you're simply trying to insert a header row? You stated that you need to "insert text at the second line, after "Liste de lecture :", but I don't really know in advance the lenght of the string I have to insert." This implies that you want to insert the header row:
Son Image subj_mes1 subj_mes2 physio_GSR physio_PPG physio_EMG physio_EEG G physio_EEG D
I'm just trying to understand what's going on here and what you're working with since it sounds like we're only getting part of the whole story. Are you trying to back-edit files that have already been created? If not, you should already know how many columns and what they are while you save your measurements, so I don't see why you need to be doing any kind of inserting in this case. You should be writing out the header before you write out the data.
10-26-2008 10:58 AM
studiobods wrote:Moreover, for better readability of the file, ...
"better readability" and 800MB are not heard together very often. 😮
Since you knoew exactly after which string you want to insert the new data, you could for example leave some blank space (of sufficient size). When you write that "Liste de lecture " write "Liste de lecture +X spaces+ a delimiter" for the first time and even mark the file position and write it in some hader at the beginning of the file.
Later you can simply read the offset from early in the file and overwrite the blanks reserved earlier.
10-26-2008 11:02 AM
altenbach a écrit:
studiobods wrote:Moreover, for better readability of the file, ...
"better readability" and 800MB are not heard together very often. 😮
Since you knoew exactly after which string you want to insert the new data, you could for example leave some blank space (of sufficient size). When you write that "Liste de lecture " write "Liste de lecture +X spaces+ a delimiter" for the first time and even mark the file position and write it in some hader at the beginning of the file.
Later you can simply read the offset from early in the file and overwrite the blanks reserved earlier.
That is what I do like I describe it in my last reply. Thanks a lot for your comments.
Matthias Baudot | Software Architect | Founder at STUDIO BODs