Strange Behavior with 4.0
- Posted by euphoric (admin) Oct 09, 2008
- 895 views
In this code:
include std/filesys.e include std/io.e include messaging.e include site_db.e object VOID function vmail_send(sequence s, integer delete_file = 1) -- default is to delete the file sequence str object filex add_routine("vmail_send") VOID = delete_file("vmailer_result.txt") -- delete this str = "..\\eu40\\bbcmf-system\\modules\\email\\vmailer\\vmailer.exe " & s[1] & " " & s[2] & " " & s[3] & " " & s[4] & " >> vmailer_result.txt" -- logfile(str) system(str,2) if delete_file then system("del " & s[1],2) end if filex = read_lines( "vmailer_result.txt" ) logfile(filex[1]) remove_routine("vmail_send") return {1,""} end function register_routine("win32email",routine_id("vmail_send"))
The line at "VOID = ..." crashes with this error:
c:/htdocs/eu40/bbcmf-system/modules/email/vmailer/vmailer.e:15 Syntax error - expected to see possibly 'end', not '(' VOID = delete_file("vmailer_result.txt") -- delete this ^
If I comment it out, it works okay.
Any idea what I'm doing wrong here?
(Looks like the <eucode> tags aren't working...)