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



>From: "Leif Svalgaard" <leif@leif.org>
>Date: Sat, 10 Nov 2001 16:07:18 -0600
>
>remove both the value and the options clause.
>and it will work.
>
>> From: Craig Rutledge <craig_rutledge@mohawkind.com>
>> > I can not get the _CLRBTS or _SETBTS to function at all.
>> ==>Craig, I have your program. Here is a portion of the prototype
>> for CLRBTS:
>>
>> i_bit_string                   *   value options(*string)

Removing VALUE means the pointer will be passed by reference.  _CLRBTS
wants data to be passed by reference.  The value keyword is correct;  If
you remove it, you have to also change the data type to be character or
numeric, to be passed by reference.

Options(*string) IS wrong - it implies that character literals can be
coded as parameters.  But it's not likely to be the source of the
problem unless a literal or expression is being passed.  As long as you
pass a pointer or %addr(field), it wouldn't matter whether the option was
coded or not.

Here is a working program; running it in the debugger showed that it
gave the expected results.

D clrbts          pr                  extproc('_CLRBTS')
D   data                          *   value
D   bit                         10u 0 value

D data            s              3a   inz(X'ffffff')

C                   callp     clrbts (%addr(data): 0)
 * now x'7fffff'?
C                   callp     clrbts (%addr(data): 8 + 7)
 * now x'7ffeff'?
C                   return

Barbara Morris



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.