[fpc-pascal]Representing data

Alan Mead cubrewer at yahoo.com
Fri May 16 17:05:20 CEST 2003

Tell me if this is not an appropriate question for this list.

I was thrilled to find out how mature FPC had become (thanks!) and
I'm using Pascal again.  But I find that I miss Perl's magical
ability to handle different data types in scalars.  Can I create an
"datum" object that can gracefully hold different types of data?

I ask because I need to represent numeric data in memory and analyze
it.  The data will "look" like an Excel spreadsheet (and if I cannot
fit it all in RAM I'll have to operate on it piece-meal).  The values
will be strings, reals, bytes and often large numbers of binary
values.  But one dataset might have one column of reals while another
might have five columns of reals.  One dataset might be composed
almost entirely of binary values while another is composed of mostly
bytes.  How can I design code that handles any of these datatypes
efficiently but without knowing in advance how much it will get? 
Execution speed, BTW, is far down on my list of priorities after
robustness, flexibility, platform independence, maintaintainability,


-Alan Mead

A Congressman was once asked about his attitude toward whiskey.  "If you mean the demon drink that poisons the mind, pollutes the body, desecrates family life, and inflames sinners, then I'm against it. "

"But if you mean the elixir of Christmas cheer, the shield against winter chill, the taxable potion that puts needed funds into public coffers to comfort little crippled children, then I'm for it."
"This is my position, and I will not compromise."

Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.

More information about the fpc-pascal mailing list