problem with euc on Win10 64bit

new topic     » topic index » view thread      » older message » newer message

I'm using

Euphoria to C Translator v4.1.0 development 
   64-bit Windows, Using System Memory 
   Revision Date: 2015-02-02 14:18:53, Id: 6300:57179171dbed 
and I've just compiled the following .ex file to .exe

include std/math.e  
include std/convert.e 
 
function Bin(integer n, sequence s = "") 
  if n > 0 then 
   return Bin(floor(n/2),(mod(n,2) + #30) & s) 
  end if 
  if length(s) = 0 then 
   return to_integer("0") 
  end if 
  return to_integer(s) 
end function 
 
printf(1, "%d\n", Bin(0)) 
printf(1, "%d\n", Bin(5)) 
printf(1, "%d\n", Bin(50)) 
printf(1, "%d\n", Bin(9000)) 

When I run that with eui.exe I get

>eui bin.ex 
0 
101 
110010 
10001100101000 
but when I run the exe, I get
>bin.exe 
0 
0 
0 
0 
As Julius Sumner Miller used to say, "Why is it so?"

bugmagnet

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu