Gamestudio Links
Zorro Links
Newest Posts
Any Old Timers Still Around?
by pyramide. 08/24/19 18:23
Script filename
by MatPed. 08/24/19 17:18
Oanda FIFO issue?
by AndrewAMD. 08/24/19 12:10
IG plugin initial release
by Dalla. 08/24/19 06:06
Tutorial for Vector Graphics
by Dooley. 08/23/19 22:32
Issue with dataParse function
by byakuren81. 08/23/19 21:57
Multiplayer subscription
by Truth. 08/23/19 20:08
candle pattern on weekly bars
by AndrewAMD. 08/23/19 13:20
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
8 registered members (pyramide, 3run, AndrewAMD, MatPed, byakuren81, Realspawn, 2 invisible), 644 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Ysbail, trader4321, GorgonzolaBYTE, Southqvist, tawin
18272 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Inexplicable behavior of file_write() #477890
08/12/19 11:59
08/12/19 11:59
Joined: Mar 2014
Posts: 13
B
Bernardo Offline OP
Newbie
Bernardo  Offline OP
Newbie
B

Joined: Mar 2014
Posts: 13
Hello, I'm desperate for banal storage.
Here is my code:

float N[12][60][12];
int filelength=60*12*12*4;
file_write("N.dat", N, filelength);

Seems to be right. But the file has only a size of 34 KB.

Does anyone have any idea what I'm doing wrong? Saving other files works!
Many thanks for your help

Forget it! Oh, dear, I got it!

Last edited by Bernardo; 08/12/19 15:01.
Re: Inexplicable behavior of file_write() [Re: Bernardo] #477895
08/12/19 18:42
08/12/19 18:42
Joined: Jan 2019
Posts: 63
berlin
L
laz Offline
Junior Member
laz  Offline
Junior Member
L

Joined: Jan 2019
Posts: 63
berlin
please post the solution for other people with the same or similar problems wink

Re: Inexplicable behavior of file_write() [Re: Bernardo] #477898
08/12/19 19:08
08/12/19 19:08
Joined: Feb 2017
Posts: 742
Chicago
AndrewAMD Online
User
AndrewAMD  Online
User

Joined: Feb 2017
Posts: 742
Chicago
For those wondering what the solution is, there was no problem. 60*12*12*4 = 34560, hence the 34 KB file.

But for aesthetic purposes, I would suggest writing it this way: sizeof(float)*12*60*12. This reads from left to right on the array declaration.


Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1