History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: BOO-244
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Rodrigo B. de Oliveira
Reporter: Arron Washington
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Boo

print macro ignores if conditionals.

Created: 26/Jan/05 08:13 PM   Updated: 31/Jan/05 12:42 PM
Component/s: Compiler
Affects Version/s: None
Fix Version/s: 0.5

Time Tracking:
Not Specified

File Attachments: 1. Text File AbstractPrintMacro.cs (4 kb)



 Description  « Hide
I think this happens with all macros, but since I do not have access to any macros that perform a function similar to "print," I can only say, for sure, that it happens with print:

>>> print "omfg" if 6666 < 0
omfg
>>>print "lawl" if 1d > 321d2h1m84s
lawl
>>>

Both statements are obviously false.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Doug H - 27/Jan/05 12:52 AM
Replace src/boo.lang.compiler/macros/AbstractPrintMacro.cs with this one and it should work. A test script:

#should just print okay once:
print "okay"
print "okay" if 100 < 0
print "okay" unless 10 > 9
print "holey", "moley" unless 10 > 9

#this works (although booi has no debug option)
debug "debug1" if 100 < 0
debug "debug1", "debug2" if 100 < 0

#this works too:
#print "hit ctrl-C to stop" while true


Arron Washington - 27/Jan/05 03:25 PM
Yeah, that resolves it!

Rodrigo B. de Oliveira - 31/Jan/05 12:42 PM
solved at the compiler level instead of at the macro level