Serious Bug(s)…

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #35053 quote
    Despair
    Blocked
    Master

    Hi,

    I have now been working with PRT for several weeks and several times got the impression that variables are not evaluated correctly and other strange bugs occur but i was always unsure and thought it was maybe me making mistakes in my programming but now i have an example where PRT makes a really big mistake.

    Here comes the example:

    x=1
    y=range>=10  //range=5.7 in my case, so y=0
    x=x and y
    if x then...
    //now x should be 0 (1 and 0 = 0) but it remains 1 and the if-loop is executed!
    
    But:
    
    x=1
    y=range>=10
    if x and y then...
    //now the expression is evaluated correctly and the loop is not executed
    
    

    How do you guys think about such errors? I mean we trust PRT with our money…

    I also found other really strange errors. One was especially peculiar. A command that was written in a comment (behind //) affected the code! The program would only run if i took away the comment. This should not happen either. Everything behind // should be ignored.

    Well and then there are several occurences when things were really strange but i couldnt really sort out what it was.

    #35073 quote
    JC_Bywan
    Moderator
    Master

    Hi,

    I tried your first example with x = x and y

    I added a display of all variables involved including the range, and an extra variable z to check the “if” statement has been properly visited, but wasn’t able to reproduce the bug, it worked fine on mine.

    x=1
    y=range>=10
    z=0
    x=x and y
    if x then
    z=3
    endif
    a=range
    
    return a as "range", x as "x", y as "y", z as "z"

    Perhaps if you show screen capture of what instrument, and tell us what timeframe, and full code listing with which you displayed x as 1 instead of zero for a displayed range as 5.7, some of us might be able to reproduce the exact same output to confirm it’s a bug or not?

    #35092 quote
    Despair
    Blocked
    Master

    I will try to come with a better example but it happens repeatedly that statements are not evaluated correctly or simply ignored. Such mistakes in code are really hard to find because the code is correct and one has to find where PRT makes mistakes – very annoying.

    Well and then this is nothing that i have to get verified. This mistkaes are happening right infront of my eyes. So i have no doubt about them. I just want to let others know because it can take a long time to find out why your program behaves strange though there is no mistake in your code.

    #35093 quote
    Nicolas
    Keymaster
    Master

    Does it still buggy with:

    x=1
    y=range>=10  //range=5.7 in my case, so y=0
    z=x and y
    if z then ..

    Notice that I changed your global condition variable name to Z instead of using twice X.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Serious Bug(s)…


Platform Support: Charts, Data & Broker Setup

New Reply
Author
author-avatar
Despair @despair Blocked
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by Nicolas
8 years, 9 months ago.

Topic Details
Forum: Platform Support: Charts, Data & Broker Setup
Language: English
Started: 05/10/2017
Status: Active
Attachments: No files
Logo Logo
Loading...