Compiler crash?

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

When i compile this program with Watcom the program open a console window with
no output.
Using Borland it produce the usual window error message. 
Is it a bug in ecw?

exw test-mydll.exw -- ok
bind test-mydll.exw -- ok
ecw -wat test-mydll.exw -- console no output
ecw -bor test-mydll.exw -- crash with windows error.

--------- test-mydll.exw
without warning
include dll.e

atom dll, up

dll = open_dll("mydll")
up = define_c_func(dll, "upper", {E_OBJECT}, E_OBJECT)

-- puts(1, c_func(up, {"aBcDEfg"}))
for n=1  to  1000  do
    puts(1, c_func(up, {rand("abcdefghijklmnopqrstuv") + ' '}) & '\n')
end for

while get_key() = -1 do
    
end while

--------- mydll.ew

function to_upper(sequence s)
    integer i
    for c=1  to length(s)  do
	i = s[c]
	if i >= 'a' then
	    if i <= 'z' then
		s[c] -= ' '
	    end if
	end if
    end for
    return s
end function

global function upper(object x)

    return to_upper(x)
end function

-------------------------
tj

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

Search



Quick Links

User menu

Not signed in.

Misc Menu