07-Jan-2022 15:57:38 bank_test(): MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2 Test bank(). ch_is_digit_test(): ch_is_digit() is TRUE if a character represents a digit. C ch_is_digit(C) "0" 1 "1" 1 "2" 1 "3" 1 "4" 1 "5" 1 "6" 1 "7" 1 "8" 1 "9" 1 "X" 0 "?" 0 " " 0 ch_to_digit_test(): ch_to_digit(): character -> decimal digit 1 "0" 0 2 "1" 1 3 "2" 2 4 "3" 3 5 "4" 4 6 "5" 5 7 "6" 6 8 "7" 7 9 "8" 8 10 "9" 9 11 "X" -1 12 "?" -1 13 " " -1 s_to_digits_test(): s_to_digits(): string -> digit vector Test string: "34E94-70.6" Extracted 5 digits: 1: 3 2: 4 3: 9 4: 4 5: 7 Test string: "34E94-70.6" Extracted 7 digits: 1: 3 2: 4 3: 9 4: 4 5: 7 6: 0 7: 6 bank_check_digit_calculate_test(): bank_check_digit_calculate() calculates the 9-th digit (the check digit) of a bank checksum. Check digit of "123-456-780" is 0, expecting 0 Check digit of "123 456 78" is 0, expecting 0 Check digit of "323-371-076" is 6, expecting 6 Check digit of "87654321" is 2, expecting 2 Check digit of "13579864" is 3, expecting 3 bank_is_valid_test() bank_is_valid() reports whether a bank checksum is valid. Validity of "323-371-076" is 1, expecting 1 Validity of "323-371-576" is 0, expecting 0 Validity of "123 456 780" is 1, expecting 1 Validity of "123 456 789" is 0, expecting 0 bank_test(): Normal end of execution. 07-Jan-2022 15:57:38