regression? in cda8948b

4 views
Skip to first unread message

Qian Yun

unread,
Apr 23, 2026, 7:53:42 AM (2 days ago) Apr 23
to fricas-devel
+ writable? f ==
+ n := f::String
+ if n = "" then
+ n := "."
+ r1 : Integer := writeablep(n)$Lisp
+ r1 > 0 => true
+ n := file_directory(n)$Lisp
+ r1 := writeablep(n)$Lisp
+ r1 > 0
-(defun |myWritable?| (s)
- (if (not (stringp s)) (|error| "``myWritable?'' requires a string arg."))
- (if (string= s "") (setq s "."))
- (if (not (|fnameExists?| s)) (setq s (|file_directory| s)))
- (if (string= s "") (setq s "."))
- (if (> (|writeablep| s) 0) 't nil) )

First, in "writable?", during the translation,
'if n = "" then n := "."' is lost after the 'file_directory' call.

This causes 'writable?("non-exist-file")$FNAME' to return false
instead of true.


+MAKEPROP('coerce, "/TRANSFORM", ["&", "&", "*"])
+MAKEPROP('comp, "/TRANSFORM", ["&", "*", "*", "&"])
+MAKEPROP('compIf, "/TRANSFORM", '["&", "*", "*", "&"])
+MAKEPROP('compFormWithModemap, "/TRANSFORM", ["&", "*", "*", "&", "*"])

Second, the quote in 'compIf' line is unintentional?

- Qian

Reply all
Reply to author
Forward
0 new messages