DiZ Posted January 23, 2005 Share Posted January 23, 2005 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 Link to comment Share on other sites More sharing options...
Valik Posted January 23, 2005 Share Posted January 23, 2005 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. Link to comment Share on other sites More sharing options...
CyberSlug Posted January 23, 2005 Share Posted January 23, 2005 Replace any instances of two-consecutive spaces with a single space? StringReplace($line, " ", " ") Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
DiZ Posted January 23, 2005 Author Share Posted January 23, 2005 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 Link to comment Share on other sites More sharing options...
DiZ Posted January 23, 2005 Author Share Posted January 23, 2005 Replace any instances of two-consecutive spaces with a single space?StringReplace($line, " ", " ")<{POST_SNAPBACK}>Thanks also, DiZ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now