Modify # function to detect long sequences#36
Open
nilness wants to merge 1 commit intofilemakerstandards:masterfrom
Open
Modify # function to detect long sequences#36nilness wants to merge 1 commit intofilemakerstandards:masterfrom
nilness wants to merge 1 commit intofilemakerstandards:masterfrom
Conversation
Long sequences (like a Base64 encoding) are returning an error. GetAsNumber ( Base64 encoding) is returning "", but the comparison "value ≠ ~number" is returning False, so ~value is set to ~number which is empty. I found two solutions, changing the comparison to "value ≠ GetAsNumber ( ~number ) ;" and adding " or number = "" " to the first Case test that assigns to "~value". I suggest the first as it will short circuit the Case tests preventing unneeded comparisons. I don't believe it will interfere with date/time/timestamp/number values as they should not return an empty string from GetAsNumber. My limited testing confirms this, but further testing/brighter minds may see something I don't.
Collaborator
|
Can you add tests for your fix to the FileMaker file that goes along with these functions? |
Author
|
Can you give me more info about what kind of tests you'd like to see, and how to present them? |
Collaborator
|
Check out the test scripts in the FileMaker file for the # functions for some examples to follow. The gist of it is that you'll want to:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Long sequences (like a Base64 encoding) are returning an error.
In line #63, GetAsNumber ( Base64 encoding) is returning "", but in line #82 the comparison "value ≠ ~number" is returning False, so ~value is set to ~number which is empty.
I found two solutions, changing the comparison in line #82 to "value ≠ GetAsNumber ( ~number ) ;", or in line #66 adding " or number = "" " to the first Case test that assigns to "~value".
I suggest the first as it will short circuit the Case tests preventing unneeded comparisons.
Does it cause a problem? It seems that it could only cause a problem if it causes Date/Time/Timestamp/Number detection to be fail. The only way it could do that is if GetAsNumber (Date/Time/Timestamp/Number) returned an empty string, and I can't see where that could happen.
My limited testing confirms this, but further testing/brighter minds may see something I don't.