Ditto,  I have found using liberal white space has saved me a lot of trouble 
over the years.   

Plus now that my eyes are 'of a certain age' I appreciate even more the habit 
of an easy-read coding style.

Marc Rutherford
Principal Programmer Analyst
Advanced Bionics LLC
661) 362 1754

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wols Lists
Sent: Friday, June 08, 2012 4:20 AM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Why did this compile??

On 07/06/12 21:24, Tony Gravagno wrote:
> When I was working at Pick Systems I found that anything can be passed 
> into format masks from BASIC, OCONV, or an F-correlative. If it 
> doesn't blow up some code deep down in the parser then it's just 
> ignored. I think the theory is that if someone knows enough to get 
> down that far into the bowels of the system then they'll be able to 
> diagnose errors resulting from faulty codes. It's sort of like not 
> putting a "Be careful of falling trees" sign in a forest where 
> lumberjacks work.
> 
> The compiler doesn't know that "~" is an invalid mask, since that's a 
> runtime feature. So VAR"anything" will compile, which is unfortunate 
> because it's probably safe to say that ALL of us have tripped on this 
> exact same issue at some point, maybe every few months for some of us.
> 
> I guess the only thing that amazes me is that none of the MVDBMS 
> providers (to my knowledge) have ever added an optional runtime trap 
> or log option when an invalid mask is detected at runtime - seems like 
> they're all just missing a Case 1 or Case True fall-through condition.
> 
Which is why I always use what some people might consider "excessive"
whitespace ...

TEST.STRING = TRIM(LINE<1>) : "~" : TRIM(LINE<3>) "~" : TRIM(LINE<4>)

The missing colon is a bit more obvious here ...

And again, Primeisms, but Primos packed whitespace fairly well. If you told the 
OS that something was a text file, a string of spaces of any length only took 
two bytes - DC1,n - where n was the number of spaces.
So I tend to be pretty free with whitespace. I find the Unix way of using tabs 
quite a pain ...

Cheers,
Wol
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to