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



Which languages were you thinking of where myVar = '' is a bad practice?

Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx


-----Justin Taylor <JUSTIN@xxxxxxxxxxxxx> wrote: -----
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
From: Justin Taylor <JUSTIN@xxxxxxxxxxxxx>
Date: 11/28/2016 09:02AM
Subject: RE: JDBC columns blank


I always thought of
*blank = ''
Not
*blank = *all' '


myVar = '' is fine for RPG, but that's a bad practice in some languages (memory issues or something like that).




-----Original Message-----
From: Scott Klement [mailto:midrange-l@xxxxxxxxxxxxxxxx]
Sent: Tuesday, November 22, 2016 4:31 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: Re: JDBC columns blank

If you think about it, it makes perfect sense. "Blank" does not mean that the string is empty, it means that it is filled with blanks (space characters).

I suppose if you've spent many years working with fixed-length strings (that cannot be empty, because they have a fixed length) you might start thinking of blanks as being the same as nothing -- but its definitely time to 'unlearn' that if you're working in other languages!! (Heck, its even time to 'unlearn' that if you're working in only RPG -- past time, in fact.)

IMHO, the way you did it (myVar = '') is the best way, everyone will understand it no matter what environment they're used to.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.