Gamestudio Links
Zorro Links
Newest Posts
How to select between IB accounts by script?
by AndrewAMD. 06/13/26 15:44
Zorro tutorial ideas?
by AndrewAMD. 06/13/26 15:01
Zorro 3.01 recoded MMI function issue
by 11honza11. 06/13/26 11:40
Max Number of Strategies in /Strategy folder
by Martin_HH. 06/12/26 08:50
Stooq now requires an API key
by AndrewAMD. 06/11/26 17:55
Z9 getting Error 058
by k_ivan. 06/10/26 14:38
ZorroGPT
by TipmyPip. 06/10/26 13:07
Z12 live performance
by alx. 06/09/26 20:42
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (Quad), 1,733 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Student_64151, Koti, curry, DeepxKalsi, Samed
19219 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Export floats into txt file #340981
09/09/10 10:23
09/09/10 10:23
Joined: Jul 2010
Posts: 11
Spain
S
skeu Offline OP
Newbie
skeu  Offline OP
Newbie
S

Joined: Jul 2010
Posts: 11
Spain
Hello to all,
i would like to ask if there is any possibility to export the floats with all decimals?

Thanks in advance laugh

Re: Export floats into txt file [Re: skeu] #341087
09/10/10 15:03
09/10/10 15:03
Joined: Dec 2008
Posts: 271
Saturnus Offline
Member
Saturnus  Offline
Member

Joined: Dec 2008
Posts: 271
I assume that this is a possibility:
file_str_write(file_handle, str_for_float(NULL, 12.345678));

Re: Export floats into txt file [Re: Saturnus] #341203
09/13/10 08:54
09/13/10 08:54
Joined: Jul 2000
Posts: 28,101
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,101
Frankfurt
The best method for exporting floats is just writing them binary into a file, f.i.

float myfloat = 3.14;
file_str_write(handle,(char*)&myfloat,4);


The second-best method is writing them as ASCII like Saturnus suggested, or using the str_printf function.


Moderated by  old_bill, Tobias 

Gamestudio download | 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