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


  • Subject: Exclusive-or (was: Re: Biton/Bitoff)
  • From: Hans Boldt <boldt@xxxxxxxxxx>
  • Date: Thu, 19 Mar 1998 09:16:35 -0500

Don:  Even with all the expression goodies we've added to RPG over
the past few years, we still have not made bit twiddling any easier.

However, if you want to do exclusive-or in a conditional expression,
you can use the <> operator.  For example, the <> in the following
statement acts just like exclusive-or:

        IF               (A<17) <> (B=10)

That is, the condition is true only if the results of (A<17) and (B=10),
are not the same.

Hans Boldt, ILE RPG Development, IBM Toronto Lab, boldt@ca.ibm.com


---------------------- Forwarded by Hans Boldt/Toronto/IBM on 98-03-19 09:01
---------------------------


owner-midrange-l@midrange.com on 98-03-19 01:08:26
Please respond to MIDRANGE-L@midrange.com @ internet
To: dmorris@plumcreek.com @ internet
cc: MIDRANGE-L@midrange.com @ internet, scott71@hpnc.com @ internet
Subject: Re: Biton/Bitoff



Since we're on this string, is there a easy implementation of a XOR
function with this or is there a XOR builtin that I've overlooked??

Don in DC metro...



On Wed, 18 Mar 1998, David Morris wrote:

> Scott,
>
> Looks like the hard way to arrive at *loval, *blank, shift zero or "A"
(Assuming english EBCIDIC).  The
> bitof is like moving *LOVAL to the field.  The biton sets the corresponding
bit on so you get
> if N60/N61 00000000 x'00', 60/N61 10000000 x'80', N60/61 01000000 = x'40', or
60/61 11000000
> = x'C0'.  x'00'=loval, x'80'=shift zero, x'40'=blank, x'C0'=A.  If you have
the windows calculator it is
> real easy to convert the values.  Just switch between binary and hex.  I
don't go back far enougth to
> know if those values are special or not but the hex '80' is a easy to
missinterpret, it displays as a zero
> on most terminals but is definitely not a zero.
>
> David Morris
>
> >>> "Scott Swaim" <scott71@hpnc.com> 03/20 2:13 PM >>>
>         Never having programmed the to opcodes, What are they?  That do they
do?
>
> Please explain what is happening with this code.
>
>
> C                                 BITOFF     '01234567'         SS1    1
> C           60                 BITON       '0'                         SS1
> C           61                 BITON       '1'                         SS1
>
>
>
>
> TIS
>
>
>
> Scott Swaim
> scott71@hpnc.com
> http://www.qualitycorps.com
>
>



!
!
!
  !
>




> +---
> | This is the Midrange System Mailing List!
> | To submit a new message, send your mail to MIDRANGE-L@midrange.com.
> | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator: david@midrange.com
> +---
>

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---



+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


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.