Difference between revisions of "Talk:ISO 7064"
From Lazarus wiki
Jump to navigationJump to searchLine 5: | Line 5: | ||
:Most likely it <b>is</b> supposed to fail if any of the chars is NOT a digit. Having it fail with an exception is not worse than having it fail in some other way (e.g. setting resukt to -MaxInt, having an out paramter indicating succes or do it like the many TryStrtoYYY conversion routines we have), as long as that behaviour is documented.--[[User:Bart|Bart]] ([[User talk:Bart|talk]]) 23:39, 28 November 2021 (CET) | :Most likely it <b>is</b> supposed to fail if any of the chars is NOT a digit. Having it fail with an exception is not worse than having it fail in some other way (e.g. setting resukt to -MaxInt, having an out paramter indicating succes or do it like the many TryStrtoYYY conversion routines we have), as long as that behaviour is documented.--[[User:Bart|Bart]] ([[User talk:Bart|talk]]) 23:39, 28 November 2021 (CET) | ||
::Documented now.--[[User:Bart|Bart]] ([[User talk:Bart|talk]]) 23:42, 28 November 2021 (CET) | ::Documented now.--[[User:Bart|Bart]] ([[User talk:Bart|talk]]) 23:42, 28 November 2021 (CET) | ||
+ | |||
+ | @Alextp. IMO the page is a bit useless now after your last edits. --[[User:Bart|Bart]] ([[User talk:Bart|talk]]) 21:34, 2 December 2021 (CET) |
Revision as of 22:34, 2 December 2021
Not stable code
Because of 'isx := StrToInt( sx );', the code fails on any non-digit string. It's bad. Alextp (talk) 19:32, 28 November 2021 (CET)
- Most likely it is supposed to fail if any of the chars is NOT a digit. Having it fail with an exception is not worse than having it fail in some other way (e.g. setting resukt to -MaxInt, having an out paramter indicating succes or do it like the many TryStrtoYYY conversion routines we have), as long as that behaviour is documented.--Bart (talk) 23:39, 28 November 2021 (CET)
@Alextp. IMO the page is a bit useless now after your last edits. --Bart (talk) 21:34, 2 December 2021 (CET)