@@ -367,31 +367,35 @@ function Load()
367
367
return nothing
368
368
end
369
369
370
- function Preload ()
371
- global rs= PSL ()
372
- offs = " "
373
- for o in offlist
374
- global offs
375
- o != :nat && (offs = offs* " off $o ; " )
376
- end
377
- write (rs. input," off nat; $EOTstr ;\n " )
378
- banner = readuntil (rs. output,EOT) |> String
379
- readavailable (rs. output)
380
- rcsl = occursin (" CSL " ,banner)
381
- if Sys. iswindows ()
382
- banner = replace (banner,r" \r " => " " )
383
- println (split (String (banner),' \n ' )[rcsl ? 1 : end - 3 ])
384
- else
385
- ReduceCheck (banner)
386
- println (split (String (banner),' \n ' )[rcsl ? 1 : end - 3 ])
370
+ if VERSION < v " 1.5"
371
+ Preload () = (global rs= PSL (); global s; eval (s); atexit (()-> kill (rs)))
372
+ else
373
+ function Preload ()
374
+ global rs= PSL ()
375
+ offs = " "
376
+ for o in offlist
377
+ global offs
378
+ o != :nat && (offs = offs* " off $o ; " )
379
+ end
380
+ write (rs. input," off nat; $EOTstr ;\n " )
381
+ banner = readuntil (rs. output,EOT) |> String
382
+ readavailable (rs. output)
383
+ rcsl = occursin (" CSL " ,banner)
384
+ if Sys. iswindows ()
385
+ banner = replace (banner,r" \r " => " " )
386
+ println (split (String (banner),' \n ' )[rcsl ? 1 : end - 3 ])
387
+ else
388
+ ReduceCheck (banner)
389
+ println (split (String (banner),' \n ' )[rcsl ? 1 : end - 3 ])
390
+ end
391
+ load_package (:rlfi )
392
+ offs |> RExpr |> rcall
393
+ rcall (R " on savestructr" )
394
+ show (devnull ," text/latex" ,R " int(sinh(e**i*z),z)" )
395
+ R " x" == R " x"
396
+ ListPrint (0 )
397
+ atexit (()-> kill (rs))
387
398
end
388
- load_package (:rlfi )
389
- offs |> RExpr |> rcall
390
- rcall (R " on savestructr" )
391
- show (devnull ," text/latex" ,R " int(sinh(e**i*z),z)" )
392
- R " x" == R " x"
393
- ListPrint (0 )
394
- atexit (()-> kill (rs))
395
399
end
396
400
397
401
global preload = false
0 commit comments