[Info-vax] Python for x86?

Arne Vajhøj arne at vajhoej.dk
Wed May 10 13:20:45 EDT 2023


On 5/10/2023 11:52 AM, Johnny Billquist wrote:
> On 2023-05-10 17:00, Arne Vajhøj wrote:
>> On 5/10/2023 9:16 AM, Johnny Billquist wrote:
>>> On 2023-05-10 11:59, Chris Townley wrote:
>>>> On 10/05/2023 04:39, Dave Froble wrote:
>>>>> The defaults in Basic are LONG integers and Single FP.  A number, 
>>>>> such as 1, is treated as a single precision FP, so that makes not 
>>>>> being specific even worse.
>>>>>
>>>>> Note, I really don't like the FP default.  Any program I write 
>>>>> specifies the defaults for both integers and FP.  Something like:
>>>>>
>>>>> OPTION SIZE = ( INTEGER WORD , REAL DOUBLE )
>>>>
>>>> Our coding standards insisted on
>>>>
>>>> OPTION TYPE = EXPLICIT
>>>
>>> That actually don't solve the problem observed here.
>>> That only makes the compiler give errors if you don't explicitly 
>>> declare variables. However constants are still being of the default 
>>> type defined.
>>
>> I am not a Basic person so not sure how much my opinion
>> should count, but I think it would be nice with:
>>
>> $ BASIC/VAR_TYPE_DEFAULT=EXPLICIT/LITERAL_TYPE_DEFAULT=INTEGER ...
> 
> Yeah. And I actually don't know what happens with constants when you say 
> type is explicit. I sortof suspect they end up as FP again... :-/
> 
> I don't have VMS BASIC around to check there, but in BASIC+2 this is the 
> case. With TYPE_DEFAULT set to EXPLICIT, literals become floating point 
> unless % is added.

Based on docs this is seems to be the case for VMS Basic as well.

If /TYPE_DEFAULT=INTEGER then 1 and 2 are integer literals
otherwise (including /TYPE_DEFAULT=EXPLICIT) they are FP literals.

Which is why I want the 2 qualifiers - one to require that
variables are declared and one to make 1 and 2 integer literals.

Alternatively I could just learn VMS Basic.

:-)

Arne







More information about the Info-vax mailing list