Code: Select all
function scanf_long_double(byref x as string , byref frmt as string= "%Lf") as clongdouble
dim as clongdouble y
asm
"movq %[X$1],%%rdi \n" _
"movq (%%rdi),%%rdi \n" _
"movq %[FRMT$1],%%rsi \n" _
"movq (%%rsi),%%rsi \n" _
"leaq %[Y$1],%%rdx \n" _
"call _sscanf \n" _
: _
:[frmt]"m"(frmt),[x]"m"(x),[y]"m"(y) _
:"rdi","rsi","rdx"
end asm
function = y
end function
Code: Select all
function scanf_long_double(byref x as string , byref frmt as string= "") as clongdouble
dim as clongdouble y
frmt = "%Lf"
....
you need to compile with -asm att