• MPL Question

    From nugax@10:102/1 to All on Friday, September 25, 2020 12:17:10
    Anyone know a function that does effectively string replace in MPL?


    Sincerely,
    -Nugax
    --=TheByteXchange BBS=--

    --- Mystic BBS v1.12 A47 2020/09/12 (Linux/64)
    * Origin: The ByteXchange BBS | bbs.thebytexchange.com (10:102/1)
  • From Black Panther@10:102/11 to nugax on Friday, September 25, 2020 12:23:40
    On 25 Sep 2020, nugax said the following...

    Anyone know a function that does effectively string replace in MPL?

    Not quite sure what you're trying to do, but there is a REPLACE function in MPL.

    Function REPLACE(Str1, Str2, Str3 : String) : String
    This function replaces all occurances of a supplied text and returns a string. Ex:

    Var Str : String = 'Hello Hello Hello';

    Str := Replace(Str, 'Hello', 'World'); // Str is now World World World

    Is that something you were looking for?


    ---

    Black Panther(RCS)
    aka Dan Richter
    Castle Rock BBS
    telnet://bbs.castlerockbbs.com
    http://www.castlerockbbs.com
    http://github.com/DRPanther
    The sparrows are flying again...

    --- Mystic BBS v1.12 A46 2020/08/25 (Linux/64)
    * Origin: Castle Rock BBS - bbs.castlerockbbs.com - (10:102/11)
  • From jack phlash@10:102/7 to nugax on Friday, September 25, 2020 14:02:57
    on 25 Sep 2020, nugax said...

    Anyone know a function that does effectively string replace in MPL?

    It's... "replace". :)

    First parameter is the string to modify, second is the substring to replace, third is the replacement string. Returns a string value.

    |08j |15A C K |08p |15H L A S H |08!

    --- Mystic BBS v1.12 A47 2020/09/07 (Windows/32)
    * Origin: d i s t o r t i o n // d1st.org (10:102/7)
  • From nugax@10:102/1 to Black Panther on Friday, September 25, 2020 22:32:38
    On 25 Sep 2020, nugax said the following...

    Anyone know a function that does effectively string replace in MPL?

    Not quite sure what you're trying to do, but there is a REPLACE function in MPL.

    Function REPLACE(Str1, Str2, Str3 : String) : String
    This function replaces all occurances of a supplied text and returns a string. Ex:

    Var Str : String = 'Hello Hello Hello';

    Str := Replace(Str, 'Hello', 'World'); // Str is now World World World

    Is that something you were looking for?


    ---

    Black Panther(RCS)
    aka Dan Richter
    Castle Rock BBS
    telnet://bbs.castlerockbbs.com
    http://www.castlerockbbs.com
    http://github.com/DRPanther
    The sparrows are flying again...


    Yes, thats exactly what I was looking for. Thanks!


    Sincerely,
    -Nugax
    --=TheByteXchange BBS=--

    --- Mystic BBS v1.12 A47 2020/09/12 (Linux/64)
    * Origin: The ByteXchange BBS | bbs.thebytexchange.com (10:102/1)
  • From Black Panther@10:102/11 to nugax on Friday, September 25, 2020 21:51:06
    On 25 Sep 2020, nugax said the following...

    Function REPLACE(Str1, Str2, Str3 : String) : String

    Yes, thats exactly what I was looking for. Thanks!

    You're welcome. I just happened to be working on an MPL when I saw the
    message. I checked my handy .doc file, and copied the info. ;)


    ---

    Black Panther(RCS)
    aka Dan Richter
    Castle Rock BBS
    telnet://bbs.castlerockbbs.com
    http://www.castlerockbbs.com
    http://github.com/DRPanther
    The sparrows are flying again...

    --- Mystic BBS v1.12 A46 2020/08/25 (Linux/64)
    * Origin: Castle Rock BBS - bbs.castlerockbbs.com - (10:102/11)
  • From nugax@10:102/1 to All on Saturday, September 26, 2020 05:35:28
    What doc file?!

    On 16:51 25/09 , Black Panther wrote:
    On 25 Sep 2020, nugax said the following...

    Function REPLACE(Str1, Str2, Str3 : String) : String

    Yes, thats exactly what I was looking for. Thanks!

    You're welcome. I just happened to be working on an MPL when I saw the >message. I checked my handy .doc file, and copied the info. ;)


    ---

    Black Panther(RCS)
    aka Dan Richter
    Castle Rock BBS
    telnet://bbs.castlerockbbs.com
    http://www.castlerockbbs.com
    http://github.com/DRPanther
    The sparrows are flying again...

    --- Mystic BBS v1.12 A46 2020/08/25 (Linux/64)
    * Origin: Castle Rock BBS - bbs.castlerockbbs.com - (10:102/11)


    --
    yrNews Usenet Reader for iOS
    http://appstore.com/yrNewsUsenetReader

    --- Mystic BBS/NNTP v1.12 A47 2020/09/12 (Linux/64)
    * Origin: The ByteXchange BBS | bbs.thebytexchange.com (10:102/1)
  • From Black Panther@10:102/11 to nugax on Saturday, September 26, 2020 12:21:32
    On 26 Sep 2020, nugax said the following...

    What doc file?!

    I've got a doc file that I believe Gryphon had put together awhile back, and
    I think it was Dream Master that had updated it, at least for A36. It's pretty current with all of the MPL functions available. Great reference material.

    I've got it here on CRBBS. Filename is mpl_112a36.zip. It is also available
    for FReq, using the same filename.


    ---

    Black Panther(RCS)
    aka Dan Richter
    Castle Rock BBS
    telnet://bbs.castlerockbbs.com
    http://www.castlerockbbs.com
    http://github.com/DRPanther
    The sparrows are flying again...

    --- Mystic BBS v1.12 A46 2020/08/25 (Linux/64)
    * Origin: Castle Rock BBS - bbs.castlerockbbs.com - (10:102/11)
  • From nugax@10:102/1 to All on Saturday, September 26, 2020 14:06:53
    Awesome. I’ll hop on later and grab it!

    On 07:21 26/09 , Black Panther wrote:
    On 26 Sep 2020, nugax said the following...

    What doc file?!

    I've got a doc file that I believe Gryphon had put together awhile back, and >I think it was Dream Master that had updated it, at least for A36. It's pretty >current with all of the MPL functions available. Great reference material.

    I've got it here on CRBBS. Filename is mpl_112a36.zip. It is also available >for FReq, using the same filename.


    ---

    Black Panther(RCS)
    aka Dan Richter
    Castle Rock BBS
    telnet://bbs.castlerockbbs.com
    http://www.castlerockbbs.com
    http://github.com/DRPanther
    The sparrows are flying again...

    --- Mystic BBS v1.12 A46 2020/08/25 (Linux/64)
    * Origin: Castle Rock BBS - bbs.castlerockbbs.com - (10:102/11)


    --
    yrNews Usenet Reader for iOS
    http://appstore.com/yrNewsUsenetReader

    --- Mystic BBS/NNTP v1.12 A47 2020/09/12 (Linux/64)
    * Origin: The ByteXchange BBS | bbs.thebytexchange.com (10:102/1)
  • From dream master@10:101/32 to nugax on Saturday, September 26, 2020 21:21:06
    On 25 Sep 2020, nugax said the following...
    Anyone know a function that does effectively string replace in MPL?

    i wrote one in mpl long time ago when i started working on master mind and then g00r00 added replace years ago. the original and still works is

    function StrTran (source : string; old : string; new : string) : string;

    begin
    while pos (old, source) <> 0 do
    begin
    pp := pos (old, source);
    delete (source, pp, length(old));
    insert (new, source, pp);
    end
    StrTran := Source;
    end

    but then g00r00 told me he added replace

    Function REPLACE(Str1, Str2, Str3 : String) : String

    This function replaces all occurances of a supplied text and
    returns a string. Ex:

    Var Str : String = 'Hello Hello Hello';

    Str := Replace(Str, 'Hello', 'World'); // Str is now World World World

    |08 .|05ú|13ù|15Dr|07e|08am Ma|07st|15er|13ù|05ú|08.
    |08 øù|05ú|13ùø |13øù|05ú|08ùø
    |11 DoRE|03!|11ACiDiC|03!|11Demonic
    |08[|15bbs|09.|15dreamlandbbs|09.|15org|08]

    --- Mystic BBS v1.12 A46 2020/08/26 (Windows/32)
    * Origin: --[!dreamland BBS bbs.dreamlandbbs.org (10:101/32)
  • From dream master@10:101/32 to Black Panther on Saturday, September 26, 2020 21:22:01
    On 26 Sep 2020, Black Panther said the following...
    I've got a doc file that I believe Gryphon had put together awhile back, and I think it was Dream Master that had updated it, at least for A36. It's pretty current with all of the MPL functions available. Great reference material.

    yes i did and i need to update it again.

    |08 .|05ú|13ù|15Dr|07e|08am Ma|07st|15er|13ù|05ú|08.
    |08 øù|05ú|13ùø |13øù|05ú|08ùø
    |11 DoRE|03!|11ACiDiC|03!|11Demonic
    |08[|15bbs|09.|15dreamlandbbs|09.|15org|08]

    --- Mystic BBS v1.12 A46 2020/08/26 (Windows/32)
    * Origin: --[!dreamland BBS bbs.dreamlandbbs.org (10:101/32)
  • From Black Panther@10:102/11 to dream master on Saturday, September 26, 2020 22:49:36
    On 26 Sep 2020, dream master said the following...

    I've got a doc file that I believe Gryphon had put together awhile ba and I think it was Dream Master that had updated it, at least for A36 It's pretty current with all of the MPL functions available. Great reference material.

    yes i did and i need to update it again.

    I have that file open on one monitor whenever I'm working on an MPL. It's a great resource! :)


    ---

    Black Panther(RCS)
    aka Dan Richter
    Castle Rock BBS
    telnet://bbs.castlerockbbs.com
    http://www.castlerockbbs.com
    http://github.com/DRPanther
    The sparrows are flying again...

    --- Mystic BBS v1.12 A46 2020/08/25 (Linux/64)
    * Origin: Castle Rock BBS - bbs.castlerockbbs.com - (10:102/11)
  • From nugax@10:102/1 to dream master on Sunday, September 27, 2020 09:12:16
    i wrote one in mpl long time ago when i started working on master mind
    and then g00r00 added replace years ago. the original and still works is

    function StrTran (source : string; old : string; new : string) : string;

    begin
    while pos (old, source) <> 0 do
    begin
    pp := pos (old, source);
    delete (source, pp, length(old));
    insert (new, source, pp);
    end
    StrTran := Source;
    end

    Is that natively in MPL? Or do we have to define it?


    Sincerely,
    -Nugax
    --=TheByteXchange BBS=--

    --- Mystic BBS v1.12 A47 2020/09/12 (Linux/64)
    * Origin: The ByteXchange BBS | bbs.thebytexchange.com (10:102/1)
  • From dream master@10:101/32 to Black Panther on Monday, September 28, 2020 14:29:19
    On 26 Sep 2020, Black Panther said the following...
    yes i did and i need to update it again.
    I have that file open on one monitor whenever I'm working on an MPL.
    It's a great resource! :)

    thank you. i am glad gryphon started it so i can update it now.

    |08 .|05ú|13ù|15Dr|07e|08am Ma|07st|15er|13ù|05ú|08.
    |08 øù|05ú|13ùø |13øù|05ú|08ùø
    |11 DoRE|03!|11ACiDiC|03!|11Demonic
    |08[|15bbs|09.|15dreamlandbbs|09.|15org|08]

    --- Mystic BBS v1.12 A46 2020/08/26 (Windows/32)
    * Origin: --[!dreamland BBS bbs.dreamlandbbs.org (10:101/32)
  • From dream master@10:101/32 to nugax on Monday, September 28, 2020 14:30:25
    On 27 Sep 2020, nugax said the following...
    Is that natively in MPL? Or do we have to define it?

    that is what i wrote but the built in replace is use in mpl now.

    |08 .|05ú|13ù|15Dr|07e|08am Ma|07st|15er|13ù|05ú|08.
    |08 øù|05ú|13ùø |13øù|05ú|08ùø
    |11 DoRE|03!|11ACiDiC|03!|11Demonic
    |08[|15bbs|09.|15dreamlandbbs|09.|15org|08]

    --- Mystic BBS v1.12 A46 2020/08/26 (Windows/32)
    * Origin: --[!dreamland BBS bbs.dreamlandbbs.org (10:101/32)