We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When a var is defined as a dict() in a class, printing a value from it can print the variable type followed by an error. Here's some sample code:
class request var headers = dict() var cookies = dict() def sendheaders(s) print get(headers, s) + chr(10) enddef def sendbody(s) enddef def sendstatus(s) enddef endclass d = dict() d("testing") = "123" print "1: " + d("testing") + chr(10) print "2: " + get(d, "testing") + chr(10) print d("testing") + chr(10) req = new(request) req.headers("testing") = "123" h = req.headers print "3: " + h("testing") + chr(10) print "4: " + get(h, "testing") + chr(10) print h("testing") + chr(10) print "5: " + req.headers("testing") + chr(10) print "6: " + get(req.headers, "testing") + chr(10) ' This fails with: ' ' DICT ' Error: ' Ln 34, Col 17 ' Code 30, Abort Code 3 ' Message: Comma or semicolon expected. print req.headers("testing") + chr(10)
Running this produces:
1: 123 2: 123 123 3: 123 4: 123 123 5: 123 6: 123 DICT Error: Ln 42, Col 17 Code 30, Abort Code 3 Message: Comma or semicolon expected.
The text was updated successfully, but these errors were encountered:
Temporarily use print get(req.headers, "testing") + chr(10) instead. I'll refactor the PRINT statement at some point.
print get(req.headers, "testing") + chr(10)
PRINT
Sorry, something went wrong.
Sounds good.
No branches or pull requests
When a var is defined as a dict() in a class, printing a value from it can print the variable type followed by an error. Here's some sample code:
Running this produces:
The text was updated successfully, but these errors were encountered: