From: Eric B. <er...@go...> - 2008-08-06 12:48:40
|
Forwarded to the list. Eric Bezault wrote: > Müller Gloria wrote: >> ~~~~~~~~~~~~~~~~~~~~ >> make(first_item: G) is >> local >> tmp: INTEGER_64 >> do >> tmp := 2 >> tmp ?= first_item >> print (tmp) >> end >> ~~~~~~~~~~~~~~~~~~~~ >> >>> the program will print 2, and not 1 or 0. It's because ISE does not >>> change the value of the target when the assignment attempt fails. >> But in my example the assignment shoudln't fail because G is INTEGER_32. > > INTEGER_32 does not conform to INTEGER_64, so the assignment > attempt fails. There is no conversion involved in assignment > attempts, so the fact that INTEGER_32 converts to INTEGER_64 > does not help. > |