Alaska Software Inc. - xpp.exe
Username: Password:
AuthorTopic: xpp.exe
Jorge Lxpp.exe
on Tue, 11 Aug 2009 10:17:30 -0300
hi to all

i wrote this line by mistake

cFile := cLINEAS + + cARCH
If ( cFile )
   ? cFile
EndIF

xpp.exe does not detect it when compile
the setting of xpp are  /a /m /n /q /w
and it behavior is erratic, often File() informs the correct value, but, and
very few ones, not


Regards
Rodd Graham Re: xpp.exe
on Wed, 12 Aug 2009 05:35:37 +0000
Hello Jorge,

> i wrote this line by mistake
> 
> cFile := cLINEAS + + cARCH
> If ( cFile )
> ? cFile
> EndIF
> xpp.exe does not detect it when compile

Because it is not actually an error.  One + operator is binary and the other 
is treated as unary.  However, I am surprise that a runtime error is not 
raised when applying the unary operator to a character string, but likely 
the unary operator was optimized out at compile time before it could be applied 
to the character data.

> the setting of xpp are  /a /m /n /q /w
> and it behavior is erratic, often File() informs the correct value,
> but, and very few ones, not

You are expecting too much from the compiler since Xbase++ is a data typeless 
language (all variables are variants) and all routine parameters are optional. 
 There are a small set of core functions that the compiler does do parameter 
count checking (and maybe some limited constant type checking) for xBase 
compatibility reasons, but in general most datatype and parameter errors 
are not detected until runtime if at all.

Regards,

Rodd Graham, Consultant
Graham Automation Systems, LLC
Jorge LRe: xpp.exe
on Thu, 13 Aug 2009 08:27:02 -0300
Thanks Rodd, very clear !


"Rodd Graham" <rgraham@grahamautomation.com> escribió en el mensaje de 
noticias news:6c56a9224cd068cbe8fbf2279a3b@news.alaska-software.com...
> Hello Jorge,
>
>> i wrote this line by mistake
>>
>> cFile := cLINEAS + + cARCH
>> If ( cFile )
>> ? cFile
>> EndIF
>> xpp.exe does not detect it when compile
>
> Because it is not actually an error.  One + operator is binary and the 
> other is treated as unary.  However, I am surprise that a runtime error is 
> not raised when applying the unary operator to a character string, but 
> likely the unary operator was optimized out at compile time before it 
> could be applied to the character data.
>
>> the setting of xpp are  /a /m /n /q /w
>> and it behavior is erratic, often File() informs the correct value,
>> but, and very few ones, not
>
> You are expecting too much from the compiler since Xbase++ is a data 
> typeless language (all variables are variants) and all routine parameters 
> are optional. There are a small set of core functions that the compiler 
> does do parameter count checking (and maybe some limited constant type 
> checking) for xBase compatibility reasons, but in general most datatype 
> and parameter errors are not detected until runtime if at all.
>
> Regards,
>
> Rodd Graham, Consultant
> Graham Automation Systems, LLC
>
>