Project

General

Profile

Bug #523

Some operators require trailing space for no good reason if the second operand is Hex or Binary.

Added by Brian Flanagan over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Low
Target version:
Start date:
10/01/2020
Due date:
% Done:

0%

Estimated time:
4:00 h
Affected version:

Description

Some operators require a trailing space if the second operand is Hex or Binary. No space should be required.

X=12345
Print X
//
// These work fine: (...and ALL operators work fine with the second operator decimal)
//
Print "NO PROBLEM:"
Print "Add:         ";X+$10,X+%10,X+10
Print "Subtract:    ";X-$10,X-%10,X-10
Print "Multiply:    ";X*$10,X*%10,X*10
Print "Exponent:    ";X^$10,X^%10,X^10
Print "Equality:    ";X=$10,X=%10,X=10
//
// These do NOT work if the 2nd operand is hexidecimal or binary (causes syntax error)
//
/*
Print
Print "THESE FAIL:"
Print "Divide:      ";X/$10,X/%10
Print "Shift Right: ";X>>$10,X>>%10
Print "Shift Left:  ";X<<$10,X<<%10
Print "Less Than:   ";X<$10,X<%10
Print "Greater Than:";X>$10,X>%10
Print "Logical And: ";X&$10,X&%10
Print "Logical Or:  ";X|$10,X|%10
Print "Inequality:  ";X<>$10,X<>%10
*/
//
// Work-around:  Add a trailing space after the operator if the 2nd operand is hex or binary.
//
Print
Print "THESE REQUIRE WORK-AROUND"
Print "Divide:      ";X/ $10,X/ %10
Print "Shift Right: ";X>> $10,X>> %10
Print "Shift Left:  ";X<< $10,X<< %10
Print "Less Than:   ";X< $10,X< %10
Print "Greater Than:";X> $10,X> %10
Print "Logical And: ";X& $10,X& %10
Print "Logical Or:  ";X| $10,X| %10
Print "Inequality:  ";X<> $10,X<> %10

Wait Key : Repeat Until Inkey$=""
End
#1

Updated by Francois Lionet over 3 years ago

  • Status changed from New to Resolved
  • Target version set to Beta RC4

Fixed

#2

Updated by Brian Flanagan over 3 years ago

  • Status changed from Resolved to Closed

Works with 10/9 updates.

Also available in: Atom PDF