G
Guest
I have an application that processes 30 kinds of strings of that fit
in an array.
By processing, I mean
-check the value of certain characters or substrings to be
within contant bounds or a member of a list
-check the value of certain characters or substrings to be
within bounds defined by other characters or substrings
-call a series of functions based on value of certain
substrings.
Each kind of string has a different length, but it fits within an
array of 128 char's
Would you do the processing with array notation (using #defines for
the array indices) in order to write the clearest code , or would you
setup a union of 30 structs (one struct for each kind of sentence) to
write clearest code?
in an array.
By processing, I mean
-check the value of certain characters or substrings to be
within contant bounds or a member of a list
-check the value of certain characters or substrings to be
within bounds defined by other characters or substrings
-call a series of functions based on value of certain
substrings.
Each kind of string has a different length, but it fits within an
array of 128 char's
Would you do the processing with array notation (using #defines for
the array indices) in order to write the clearest code , or would you
setup a union of 30 structs (one struct for each kind of sentence) to
write clearest code?