Results 1 to 3 of 3

Thread: error or not error ?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Member DirectuX's Avatar
    Join Date
    Oct 2018
    Location
    France
    Posts
    417
    Rep Power
    55

    Question error or not error ?

    Should this code raise an error ?

    uses "console"
    
    dim myvar as DWord = 1
    myvar = - myvar
    printl myvar
    WaitKey
    
    myvar is declared as an unsigned variable. Why is it allowed to compute something below 0 ?

    Edit: All the same, if you declare
    • a variable as byte and assign a value outside the 0-255 range
    • a variable as boolean that isn't %true nor %false



    Regarding this previous question and the last Petr's blog page,
    is there a list of all errors caught by thinBasic ?
    Last edited by DirectuX; 01-03-2020 at 19:34.
    ThinBasic 1.11.6.0 ALPHA - Windows 8.1 x64

Similar Threads

  1. Error 216
    By opel_howard in forum Free Pascal
    Replies: 0
    Last Post: 13-11-2010, 18:48
  2. Little error
    By Petr Schreiber in forum Module SDK (Power Basic version)
    Replies: 1
    Last Post: 30-06-2006, 17:17
  3. Little error
    By Petr Schreiber in forum Fixed or cleared errors in help material
    Replies: 3
    Last Post: 22-02-2006, 10:59

Members who have read this thread: 0

There are no members to list at the moment.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •