× 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: Re[3]: Bitwise ops in RPG
  • From: boldt@xxxxxxxxxx
  • Date: Tue, 21 Nov 2000 08:02:39 -0500
  • Importance: Normal



Eric wrote:
>Thanks Hans, it is too bad that it is so expensive... I would love to
>see an Object Pascal implementation on the AS/400 along with some of
>my other favorite pet languages (LISP, Prolog, etc... I know that I am
>pushing the limits of syntax by calling either one of those a compiler
>:-) Perhaps IBM in it's new sense of openness could release this as,
>dare I hope, freely available material so that more languages could
>become available on the AS/400. Nah that would make too much sense :-)

First, well, LISP and Prolog are typically implemented using
interpreters and not compilers.  And so they're not dependent
on any particular back-end.  Interpreted languages are normally
very portable since they're usually implemented using some
language that common to many different platforms, typically C.
That's why Perl has become so ubiquitous - it's implemented in
C.

Second, yeah, I agree it would make too much sense to make
W-Code an open technology.  I think IBM's position, though, can
be summarized as follows:  "It cost us a lot of money to develop
this technology, so damned if we're going to give it away!"
Many people who write software take this approach, and even
though we don't necessarily agree with it, we have to respect
their position.

>
>You say that it looks a lot like 8086 ASM, I would hope that it would
>look more like 68x00 ASM, which always made a ton more sense to me!
>Seeing as W-Code is geared toward an abstract virtual machine and can
>handle low level language constructs with aplomb I do not see why a
>Object Pascal compiler that emitted W-Code would not be a great
>idea... I would assume that W-Code would be a extremely thin layer
>over the PowerPC instruction set.

Actually, what I meant to say was that if you're familiar with
any assembler programming, W-Code would look familiar.  It bears
little resemblance to any specific real assembler programming
since there are no registers to deal with.  That's an issue best
left to the optimizer.

>
>Without getting you in trouble, does it support object oriented
>features such as multiple method signatures, *this (to use C++
>nomenclature), and inheritence? Or is that something one would need to
>roll on their own? Is the language syntax "extensible" like a
>macro-assembler or even better like Forth? :-)

No, W-Code is fairly low-level and makes few concessions to high-
level language concepts.  That's why aggressive optimizations are
possible.

>
>Ok that is probably more than enough about this non-RPG topic. Oh I
>would really prefer the AND, NOT, XOR, OR bitwise operations rather
>than bifs because of the need many times to AND multiple bit masks
>together to come up with the final bit mask. (I like to do as many
>things that are logically related in one line as possible and let the
>compiler manage work variables for me :-)

I think I'd prefer infix operators too.  But by my informal
count, BIF supporters outnumber us by about 2 to 1.  BIF's can
certainly be defined to handle ANDing or ORing multiple values
at once, since the BIFs could be defined to take any number of
operands.

Cheers!  Hans

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

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-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.