× 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.



>Date: Wed, 05 Sep 2001 15:40:40 -0400
>From: "M. Lazarus" <mlazarus@ttec.com>
>
>  What is the difference between options(*varsize) and varying?  Is
>*varsize a fixed length field that can accept any size parm?  If yes, why
>would you use that over varying, where you can use %Len() to determine the
>parm length?

mark, "varying" relates to the datatype.  options(*varsize) is a way of
telling the compiler to relax its rules about parameter passing.  (You can
code both varying and options(*varsize) for a parameter.)

For input-only parameters (value/const), I would always use varying.  For
output parameters, it's sometimes more convenient to allow fixed-length
fields to be passed.  When you return values using output parameters, you
have to decide which will be more convenient for your callers; will they
most often have varying fields or fixed-length fields to pass you?  (That's
why I suggested to Buck that he return the value rather than using a
parameter.)  With output varying parameters, you can't use %len to
determine the maximum size, only the current size.

When the parameter is a data structure, it doesn't really make sense to
use varying, but it often makes sense to allow shorter structures to be
passed (all the APIs that return information work that way).

Barbara Morris



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.