Announcement

Collapse
No announcement yet.

Compiler slips.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • DienyduToit
    Guest replied
    Thanks, Paul and Lance. I'd no idea such code might be valid
    syntax; it makes little sense to me, though possibly in some
    other context it has application.

    Er - yes, Lance, that was a typo.

    ------------------

    Leave a comment:


  • Lance Edmonds
    replied
    Paul is correct - the typo created a boolean evaluation for the subscript value - a perfectly valid syntax.
    - should be --
    Code:
    If Rcvd&(dtlItm[b])&>0[/b] Or itmFlg&(dtlItm&)>0 Then
    Er, I assume the "corrected line" was a typo? ")&>0" is a real syntax error.




    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Paul Noble
    replied
    Dieny,

    That's because the first line is perfectly valid syntax -
    Code:
      Rcvd&(dtlItm&>0)
    ...will evaluate to Rcvd&(%TRUE) or Rcvd&(%FALSE) at run-time, which may or may not be
    sensible, depending on what these things mean. The compiler is correct. The upgrade
    you seek is the #DoWhatIMean directive, which I also eagerly await

    Regards,

    Paul

    ------------------
    http://www.zippety.net
    mailto[email protected][email protected]</A>

    Leave a comment:


  • DienyduToit
    Guest started a topic Compiler slips.

    Compiler slips.

    This line of code gave no compile error, but a run time error 9:

    Code:
    If Rcvd&(dtlItm&>0) Or itmFlg&(dtlItm&)>0 Then
    - should be --

    Code:
    If Rcvd&(dtlItm)&>0 Or itmFlg&(dtlItm&)>0 Then
    Roll on, upgraded/updated Editor ... !


    ------------------
Working...
X