Talk:ASCII art diagram converter: Difference between revisions

From Rosetta Code
Content added Content deleted
(need to rethink comments - D's output is numeric representation of octets)
Line 10: Line 10:
Are you sure that the code is correct?<br>
Are you sure that the code is correct?<br>
--[[User:Smls|Smls]] ([[User talk:Smls|talk]]) 23:09, 30 January 2014 (UTC)
--[[User:Smls|Smls]] ([[User talk:Smls|talk]]) 23:09, 30 January 2014 (UTC)



The code there only worked on 32 bit, but it is fairly easy to fix. I'll do it now.

Revision as of 03:43, 2 April 2014

D solution won't compile

I installed the Digital Mars D compiler version 2.064.2 on my Linux box (x86_64 architecture), copied the snippet into a file, and passed it to dmd - but it failed with this error:

$ dmd ascii_struct.d
ascii_struct.d(121): Error: cannot implicitly convert expression ((line.length - 1LU) / 3LU) of type ulong to uint
ascii_struct.d(139): Error: cannot implicitly convert expression ((field.length + 1LU) / 3LU) of type ulong to uint
ascii_struct.d(188): Error: CTFE failed because of previous errors in makeStructFromDiagram

Are you sure that the code is correct?
--Smls (talk) 23:09, 30 January 2014 (UTC)


The code there only worked on 32 bit, but it is fairly easy to fix. I'll do it now.