in reply to Thoughts on designing a file format.
All good points ++
I read a paper once that explained very clearly why the two character line endings (CR, LF) in DOS was a mistake, I have no idea where it was but Wikipedia echoes the sentiment. Either way documenting it is OK but using the line endings appropriate for your OS is a better approach.
Two points I would add
- Allow comments -my preference is for # comments
- Ignore blank and whitespace only lines
Hence any data file parsing I do usually ends up beginning like this-
next if /^\s*#/; next if /^\s*$/;
--
Murray Barton
Do not seek to follow in the footsteps of the wise. Seek what they sought. -Basho
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Thoughts on designing a file format.
by demerphq (Chancellor) on Sep 13, 2005 at 07:27 UTC | |
by greenFox (Vicar) on Sep 13, 2005 at 08:55 UTC | |
Re: Thoughts on designing a file format.
by jonadab (Parson) on Sep 13, 2005 at 17:30 UTC |
In Section
Meditations