× 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: Prototyping printf()
  • From: "Simon Coulter" <shc@xxxxxxxxxxxxxxxxx>
  • Date: Wed, 27 Sep 00 17:05:49 +1000
  • Importance: Normal


Hello Hans,

You wrote:
>Exsqueeze me?  Why care about C's printf function at all?  The
>main reason C has this weird function is to make up for it's
>poor string handling support.  Why not use RPG's native string
>handling capabilities to build the string before output?  You
>can easily concatenate strings using the + operator and you can
>easily convert numeric to char using %CHAR, %EDITC, and %EDITW.
>RPG's string support is easily miles ahead of C, so why not
>take advantage of it?

I don't really care.  It just started as a Q&D approach which piqued my 
curiosity and 
lead to some experimentation.  Using RPG's conversion functions and passing 
everything as 
strings is what I ended up doing for describing the final prototype. 

>(Mind you, we do realize that RPG, or rather the AS/400 in
>general, needs better operational descriptor support which might
>make prototyping printf easier.  But printf is a bad example for
>justifying that.)

Then don't use printf() as justification :)  but move it up the list please!  
Although I 
don't see operational descriptors helping in this case (unless I wanted to 
write my own 
printf-like function in which case I would need to know the data types).  This 
problem is 
all in differences between language parameter passing preferences -- VALUE vs. 
REFERENCE 
-- and prototyping limitations.  But now you guys know that at least some of us 
want that 
sort of support so I'm sure it'll get on the ToDo list  :)

Regards,
Simon Coulter.


 FlyByNight Software         AS/400 Technical Specialists       
 Eclipse the competition - run your business on an IBM AS/400.  
                                                                
 Phone: +61 3 9419 0175      Mobile: +61 0411 091 400           
 Fax:   +61 3 9419 0175      mailto: shc@flybynight.com.au      
                                                                
 Windoze should not be open at Warp speed.                      

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