× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



When I teach the VARYING keyword, I always teach it this way:

D myVar s 500A varying

500 is the maximum number of characters that can be stored.
varying means that it's not always that large.

If you changed the spec to look like this:

D myVar s 500A varying(*max64kb)

Then it'd be rather unclear when I said that 500 was the maximum number of characters. It's hard to explain why both 500 and 64k are the maximum in the same statement. Not only that, but it's quite a bit of typing to type Varying(*max128tb) (or any of the *MAX things).

Please, lets not make things more complicated to teach then they already are.

Err... also, I'm not sure that we need a *MAX32KB. Is that just for compatibility with older releases, or what?


Joe Pluta wrote:

Okay, how about something straightforward:

VARYING(*MAX32KB)
VARYING(*MAX2GB)
VARYING(*MAX128TB)

The numbers are based on 2, 4 and 6 byte prefixes, but with one bit unused
(not sure why one bit is unused, except that 32KB is the current maximum, so
I kept the pattern going).

Let VARYING default to VARYING(*MAX32KB) and all is well.

I stopped at 48-bit addressing (technically 47-bit) because it's just hard
for me to conceive of a situation where one would need more than 128
terabytes for a single field. If you decided to go to 63 bits, I guess you
do *MAX8EB (eight exabytes).

Joe




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.