1. Phix: replace
- Posted by andreasWagner Nov 14, 2024
- 740 views
Hallo,
This code from the Phix Documentation
sequence s
s = replace("John Middle Doe", "Smith", 6, 11)
-- s is "John Smith Doe"
s = replace({45.3, "John", 5, {10, 20}}, 25, 2, 3)
-- s is {45.3, 25, {10, 20}}
Produces this error (testet with Phix 1.04,1.05,1.03)
D:\devpool\projects\demo\easy4hang\rep.exw:2
s = replace("John Middle Doe", "Smith", 6, 11)
^ a namespace qualifier is required
replace is defined in:
D:\devpool\projects\demo\easy4hang\rep.exw:2
s = replace("John Middle Doe", "Smith", 6, 11)
^ a namespace qualifier is required
replace is defined in:
Press Enter, or d for diagnostics...
This are the first lines from ex.er
1..109] = "D:\\devpool\\projects\\demo\\easy4hang\\rep.exw:2\ns = replace(\"John Middle Doe\", \"Smith\", 6, 11)\n ^ a namespace"
errline[110..156] = " qualifier is required\nreplace is defined in:\n\n"
txtline = `s = replace("John Middle Doe", "Smith", 6, 11)`
fni = <novalue>
lt = 47'/'
k = 46'.'
fn = 3
sli = <novalue>
sfi = <novalue>
i = 0
... called from C:\Phixsetup\phix\pmsgs.e:549 in procedure Abort_multi()
msg = "a namespace qualifier is required\nreplace is defined in:\n"
abort_set = {}
f = <novalue>
pathno = <novalue>
ff = <novalue>
dbg = {}
i = 1
... called from C:\Phixsetup\phix\psym.e:3752 in function InTable()
thank you in advance
Andreas
2. Re: Phix: replace
- Posted by petelomax Nov 15, 2024
- 670 views
psym.e contains the following at both line 3043 and 3046 (ish):
initialAutoEntry("replace", S_Func,"FPONN", "pseqc.e",0,E_none,3)
I probably slipped up when putting things in alphabetic order, not that they have to be.
Delete either, run p -cp, and you should be good to go.
Thanks!
3. Re: Phix: replace
- Posted by andreasWagner Nov 15, 2024
- 673 views
psym.e contains the following at both line 3043 and 3046 (ish):
initialAutoEntry("replace", S_Func,"FPONN", "pseqc.e",0,E_none,3)
I probably slipped up when putting things in alphabetic order, not that they have to be.
Delete either, run p -cp, and you should be good to go.
Thanks!
Thank you, this works
funny note: deepl translates "Delete either, run p -cp, and you should be good to go." to
(retranslated) "Delete both, run p -cp and you should be good to go again."
and this didn't worked 
(I should trust my own translation more again)

