- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think I already know the answer to this, but does anyone know of a technique or function that allows me to read in a real number and output it with the same number of digits after the decimal point? In other words, reading in 123.456 and 123.45 in F8.0 format and then writing out 123.456 and 123.45 in F8.3 and F8.2 format automatically. I am writing a version converter program that reads in input files of the old version and then rewrites them in the new version format and can't arbitrarily decide how many digits after the decimal point to write out because of the variation in the input data.
I think I can write a routine to do this (would have to convert reals to character values), but it would be complicated and was hoping that someone had already decided this was a useful feature and implemented it somewhere.
Tom
I think I can write a routine to do this (would have to convert reals to character values), but it would be complicated and was hoping that someone had already decided this was a useful feature and implemented it somewhere.
Tom
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, I feel like a fool - just read it in as A8 and write it out as A8.
Tom
Tom
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page