Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [SOLVED] Save floats to a .txt file from an array

Author
Message
Lance
21
Years of Service
User Offline
Joined: 22nd Jul 2003
Location: Third planet from Sun
Posted: 22nd May 2019 18:37
I want to save float values from an array to a text file ( .txt ) with only 3 numbers after the decimal point . Example , from 2.213000 to 2.213 . And no , I am not using J son (?) .

Lance

The author of this post has marked a post as an answer.

Go to answer

MadBit
VIP Member
Gold Codemaster
15
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 22nd May 2019 21:22
Maybe this.


Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 22nd May 2019 22:10 Edited at: 22nd May 2019 22:12
This post has been marked by the post author as the answer.
Lance
21
Years of Service
User Offline
Joined: 22nd Jul 2003
Location: Third planet from Sun
Posted: 22nd May 2019 23:58 Edited at: 22nd May 2019 23:59
Thanks all :
I made my array a float > Keyx [30,6] as float then wrote to a file Strings$= str(KeyX[n,data],3 ) WriteLine(writeK,Strings$)

All I had to do was add the ,3 Very crude but it works ..........


Lance
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire

Login to post a reply

Server time is: 2024-11-22 21:22:26
Your offset time is: 2024-11-22 21:22:26