I should make this very clear and specify that I only asked regarding my particular assignment, B&S 2.2.3.
I emailed Sun (
who2contact@sun.com ) with the following:
I have received my assignment and ask:
May I receive a clarification regarding null-terminated values?
I'm doing Bodgitt and Scarper assignment version 2.2.3, and have two lines that confuse the heck out of me.
First line is from Data File Format, Data section of the assignment:
"Data section.
Repeat to end of file:
1 byte flag. 00 implies valid record, 0xFF implies deleted record Record containing fields in order specified in schema section, no separators between fields, each field fixed length at maximum specified in schema information."
Which strongly implies "fixed field format", which would be padded by spaces.
Second quote, last paragraph in Data File Format section:
"All text values, and all fields (which are text only), contain only 8 bit characters, null terminated if less than the maximum length for the field."
Which comes to say that strings within fields should be null-terminated if shorter than field width.
Using a hex-editor, I have seen that the data file as provided by Sun contains no such null-values, regardless of the record fields being less than the maximum length for the field.
I would request a clarification on this matter since code consistency and clarity is of the up-most importance when grading submitted assignments.
Thank you
I received the following response from Monica Green at Sun yesterday (Saturday, January 8, 2005):
> Sorry about the confusion. There's a typo in your assignment. Please
> ignore all references to null-terminated or null-padded values. Treat
> the fields as space padded.