Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: thinBasic Beta 1.9.4.0

  1. #11
    Hi Eros,

    Thanks for update.

  2. #12
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,525
    Rep Power
    170
    Something is wrong when using With/End With and IIF -

    but just today - the functions were fine yesterday:
    Could it be some change in the new thinCore.dll which I downloaded from the other thread?

    Example:

    Type bar
    foo as Any
    End type

    With bar
    .foo = IIF( .foo, False, True)

    End With

    Produces strange Error, mostly missing parenthesis or expected something
    "Token found" is always some variable near these IIF-Lines.

    Strange also: It runs through the sub/functions a few dozen times without any complain and all of a sudden: Error!
    It stops making these Errors when I remove "With/End With" and use full "Variable.Subset"

    EDIT:
    Also I experience lots of strange crashes today - Windows tells "thinBasic does not work any more" - and ends the script.
    Last edited by ReneMiner; 26-03-2013 at 16:56.
    I think there are missing some Forum-sections as beta-testing and support

  3. #13
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Hi Rene,

    could you please create complete minimal crashing example and post it here? I tried this:
    Type tType
      foo As Long
    End Type
    
    Dim v As tType
    
    With v
      .foo = IIf( .foo, FALSE, TRUE)
    End With
    
    ...and no problem was indicated, even with the latest core.


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  4. #14
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,525
    Rep Power
    170
    ' Empty thinBasic CONSOLE file template
    
    Uses "Console"   
    
    Type t_x
      A As Long
      B As Long
      C As Long
      D As Long
    End Type
    
    
    Dim foo() As t_x
    ReDim foo(1) 
    Dim nFoos As Long
    
    
    While TRUE
      PrintL "Press key"
    
      WaitKey
      PrintL "foo(" + TStr$(New_Foo()) +") created"
      
    Wend
    
    
    Function New_Foo() As Long
      nFoos += 1
      
      ReDim Preserve foo(nFoos)
      
      Randomize
      
      With foo(nFoos)
        .A = Rnd(1000)
        PrintL ".A =" + Str$(.A)    
        .B = Rnd(1000)
        PrintL ".B =" + Str$(.B)    
        .C = .A - .B            
        PrintL ".C =" + Str$(.C)    
        .D = IIf(.C > 0, .A, .B) 
        PrintL ".D =" + Str$(.D)    
      End With
      
      Return nFoos
      
    End Function
    
    Run a few times, i.e. press key until it happens...
    Edit: seems to me the IIF breaks WITH - the End With gets ignored thereafter
    Last edited by ReneMiner; 26-03-2013 at 18:40.
    I think there are missing some Forum-sections as beta-testing and support

  5. #15
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    Yes, I confirm there is something wrong from the second time on.
    Something seems not resetting.
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  6. #16
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,525
    Rep Power
    170
    Once again: seems to me the IIF(.C>0...) breaks WITH - the End With gets ignored thereafter

    It gets more weired if you change line 41 to this

    foo(nFoos).D = IIf(foo(nFoos).C > 0, foo(nFoos).A, foo(nFoos).B)

    And does not happen if you remove the whole With-End With

    Edit: Can be possible that the bug was already present before thinCore.dll-update - I might have tested my affected Functions just once per run before
    Last edited by ReneMiner; 26-03-2013 at 20:13.
    I think there are missing some Forum-sections as beta-testing and support

Page 2 of 2 FirstFirst 12

Similar Threads

  1. thinBasic Beta 1.9.1.0
    By ErosOlmi in forum thinBasic Beta testing
    Replies: 2
    Last Post: 26-10-2012, 18:31
  2. thinBasic Beta 1.8.4.x
    By ErosOlmi in forum thinBasic Beta testing
    Replies: 8
    Last Post: 29-06-2010, 15:50
  3. thinBasic beta 1.7.10.2
    By ErosOlmi in forum thinBasic Beta testing
    Replies: 3
    Last Post: 17-02-2010, 14:55
  4. thinBasic beta 1.7.10.1
    By ErosOlmi in forum thinBasic Beta testing
    Replies: 11
    Last Post: 08-02-2010, 07:09
  5. thinBasic beta 1.7.8.0
    By ErosOlmi in forum thinBasic Beta testing
    Replies: 34
    Last Post: 28-06-2009, 16:16

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

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