Code: Select all
(import "msvcrt.dll" "sscanf")
(let ((day 0) (mon 0) (year 0))
(sscanf "1990-01-01" "%d-%d-%d" (address year) (address mon) (address day)))
Code: Select all
(import "msvcrt.dll" "sscanf")
(let ((day 0) (mon 0) (year 0))
(sscanf "1990-01-01" "%d-%d-%d" (address year) (address mon) (address day)))
Code: Select all
> (map (fn (x) (int x 0 10)) (parse "1990-01-01" "-"))
(1990 1 1)
Code: Select all
(import "msvcrt.dll" "sscanf" "cdecl") ; <- C-calling conventions for varargs
Well, I had found the issue just now.Lutz wrote:... and you also should try:C-calling conventions may handle variable number of arguments in sscanf better.Code: Select all
(import "msvcrt.dll" "sscanf" "cdecl") ; <- C-calling conventions for varargs