キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

Strange Binary File Write Behaviour

解決済み
解決策を見る

Something a bit strange going on when I attempt to write data to a binary file. I've replicated the issue in StrangeBinaryFileBehaviour.vi which is attached below...

 

I'm merely writing two bytes to a binary file yet my hex editor/viewer is telling me I have 6 bytes of data, a screenie of the hex editor dump of the binary file is also attached

 

Maybe I'm losing the plot and am missing something, forgive it's late on a friday スマイリー 舌

 

Strokes

すべてをダウンロード
0 件の賞賛
メッセージ1/3
2,701件の閲覧回数
解決策
トピック作成者Strokesが受理

Wire a FALSE to the "prepend array or string size ...?" terminal. The default is TRUE so you get additional bytes, depending on what you wire.

 

For a 1D array, you would get 4 additional bytes for the array size (I32) and tha's what you are seeing.

メッセージ2/3
2,697件の閲覧回数

@altenbach wrote:

Wire a FALSE to the "prepend array or string size ...?" terminal. The default is TRUE so you get additional bytes, depending on what you wire.

 

For a 1D array, you would get 4 additional bytes for the array size (I32) and tha's what you are seeing.


I can't tell you how many times that has bit me in the arse.  I understand why the default it TRUE, but I have yet to run into a case where I actually wanted it to be TRUE.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
メッセージ3/3
2,688件の閲覧回数