|
From: | Chris Dean |
Subject: | [Bug-kawa] [bug #13865] Symbols don't evaluate to themselves when they look like units |
Date: | Wed, 20 Jul 2005 18:09:47 +0000 |
User-agent: | Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.9) Gecko/20050711 Firefox/1.0.5 |
URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=13865> Summary: Symbols don't evaluate to themselves when they look like units Project: Kawa Submitted by: ctdean Submitted on: Wed 07/20/2005 at 18:09 Category: Scheme language Severity: 3 - Normal Item Group: Unexpected result Status: None Privacy: Public Assigned to: None Open/Closed: Open _______________________________________________________ Details: Here's a fun Kawa bug. We all know that units are available in Kawa: #|kawa:4|# 7min 7min #|kawa:5|# (+ 8min (* 2 60s)) 10.0min The expression 7min represents seven minutes and units can be used in arithmatic operations. What if you use a unit that Kawa doesn't know about? We get a nice error: #|kawa:9|# 10volts 10volts gnu.mapping.UnboundLocationException: Unbound symbol volts$unit at gnu.expr.ReferenceExp.eval(ReferenceExp.java:115) at gnu.expr.Expression.apply(Expression.java:35) ... The bug is when you use a symbol that looks like a unit number but for a unit that doesn't exist: #|kawa:11|# '7min ; works 7min #|kawa:12|# '10volts ; busted (* 10 volts$unit) You get this result that is clearly not a symbol. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=13865> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |