The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
REPLACE Doesn't.
03-31-2017, 01:40 PM (This post was last modified: 03-31-2017 01:41 PM by toml_12953.)
Post: #1
REPLACE Doesn't.
I'm trying to replace spaces in a string with zeroes but I get the same string back unchanged. The program below prints
" 9"
" 9"
Of course I'm doing something wrong but I can't figure out what. REPLACE does work at the home screen.

Tom L

PHP Code:
EXPORT test()
BEGIN
  local x
,i;
  print();
  
x:="    9";
  print(
""""+x+"""");
  for 
i from 1 to 4 do
   
replace(x,i,"0");
  
end;
  print(
""""+x+""""); 
END

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
REPLACE Doesn't. - toml_12953 - 03-31-2017 01:40 PM
RE: REPLACE Doesn't. - Dieter - 03-31-2017, 01:48 PM
RE: REPLACE Doesn't. - toml_12953 - 03-31-2017, 02:06 PM
RE: REPLACE Doesn't. - Han - 03-31-2017, 02:10 PM
RE: REPLACE Doesn't. - toml_12953 - 03-31-2017, 02:15 PM
RE: REPLACE Doesn't. - Tim Wessman - 03-31-2017, 03:59 PM
RE: REPLACE Doesn't. - Dieter - 03-31-2017, 05:25 PM
RE: REPLACE Doesn't. - toml_12953 - 04-01-2017, 12:25 AM
RE: REPLACE Doesn't. - eried - 03-31-2017, 01:53 PM



User(s) browsing this thread: 1 Guest(s)