Jump to content
Sign in to follow this  
DiZ

Scientific Notation

Recommended Posts

I'm currently reading in lines from a file using the _FileReadToArray function.

The lines contain rows of scientific notation numbers, some negative and some positive. If I use StringSplit with a space as the delimiter I can create an array of the numbers however due to the format of the file, where one or more spaces seperate the numbers, this array also contains some blank entries. I am trying to check each array entry to see if it is a number. Do any of the built in functions handle scientific notation ? I can not seem to get it to work using isNumber or StringIsNum.

DiZ

Share this post


Link to post
Share on other sites

Check out StringStripWS(). There's an option to strip multiple spaces down to a single space. That would ensure no blank elements in the array.

Share this post


Link to post
Share on other sites

Check out StringStripWS().  There's an option to strip multiple spaces down to a single space.  That would ensure no blank elements in the array.

<{POST_SNAPBACK}>

Thanks for the advice,

DiZ

Share this post


Link to post
Share on other sites

Replace any instances of two-consecutive spaces with a single space?

StringReplace($line, "  ", " ")

<{POST_SNAPBACK}>

Thanks also,

DiZ

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...