Post Reply 
RPL/2
07-31-2017, 12:23 PM
Post: #10
RE: RPL/2
Some news.

For a long time, it was possible to write libraries to add new functionalities into RPL/2. In 4.1.27, it is possible to manage new types in these libraries.

RPL/2 is now shipped with two libraries. The first one motif$ is used to create graphical applications. The second one, sets$, is able to work on sets and defines a new type with ([ ]) delimiters and five new instructions :
- complement
- union
- intersection
- s->l (set to list)
- l->s (list to set)

Example :

Code:

#!/usr/local/bin/rpl -sp -m sets.rplso

TEST
<<
        externals disp

        ([ 1 2 3 4 5 6 7 8 9 ]) ([ 3 6 8 ]) complement disp
        ([ 1 2 8 9 ]) ([ 3 6 8 ]) union disp
        ([ 1 2 8 9 ]) ([ 3 6 ]) intersection disp

        ([ 1 2 3 0 ]) disp
        ([ 1 2 3 5 ]) s->l disp
        { 1 2 2 5 1 2 } l->s disp

        clmf
>>

that returns :
Code:

schroedinger:[~/cvs/rpl/modules/sets] > ./example.rpl 
+++RPL/2 (R) version 4.1.27 (Lundi 31/07/2017, 14:02:25 CEST)
+++Copyright (C) 1989 à 2016, 2017 BERTRAND Joël

Sets library V1R1 for RPL/2 (C) 2017 BERTRAND Joel
Sets library loaded.

{ "complement"
  "intersection"
  "l->s"
  "s->l"
  "union" }
([ 1 2 4 5 7 9 ])
([ 1 2 3 6 8 9 ])
([ ])
([ 0 1 2 3 ])
{ 1
  2
  3
  5 }
([ 1 2 5 ])

Sets library unloaded.

schroedinger:[~/cvs/rpl/modules/sets] >

This new functionality will be available the 1st of august 2017 in daily snapshot.

Best regards,

JKB
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RPL/2 - JKB - 09-18-2015, 09:09 AM
RE: RPL/2 - JKB - 11-26-2015, 12:50 PM
RE: RPL/2 - Thomas Klemm - 11-26-2015, 08:44 PM
RE: RPL/2 - JKB - 03-01-2016, 10:48 PM
RE: RPL/2 - JKB - 09-27-2016, 04:08 PM
RE: RPL/2 - compsystems - 09-27-2016, 07:54 PM
RE: RPL/2 - JKB - 09-28-2016, 08:25 AM
RE: RPL/2 - JKB - 10-12-2016, 08:10 AM
RE: RPL/2 - JKB - 06-28-2017, 09:24 AM
RE: RPL/2 - JKB - 07-31-2017 12:23 PM
RE: RPL/2 - pier4r - 08-01-2017, 06:24 PM
RE: RPL/2 - JKB - 08-01-2017, 06:30 PM
RE: RPL/2 - pier4r - 08-01-2017, 09:33 PM
RE: RPL/2 - JKB - 08-01-2017, 09:48 PM
RE: RPL/2 - pier4r - 08-02-2017, 07:37 PM
RE: RPL/2 - JKB - 08-03-2017, 05:25 PM
RE: RPL/2 - pier4r - 08-13-2017, 02:12 PM
RE: RPL/2 - JKB - 08-21-2017, 09:15 AM
RE: RPL/2 - pier4r - 08-21-2017, 09:30 AM
RE: RPL/2 - JKB - 08-21-2017, 09:54 AM
RE: RPL/2 - pier4r - 08-21-2017, 11:45 AM
RE: RPL/2 - pier4r - 08-27-2017, 11:44 AM
RE: RPL/2 - JKB - 08-30-2017, 06:56 AM
RE: RPL/2 - pier4r - 08-30-2017, 09:10 AM
RE: RPL/2 - JKB - 09-28-2017, 12:07 PM
RE: RPL/2 - pier4r - 09-28-2017, 01:58 PM
RE: RPL/2 - JKB - 10-11-2017, 04:21 PM
RE: RPL/2 - lost2 - 10-17-2017, 01:30 PM
RE: RPL/2 - JKB - 10-17-2017, 02:42 PM
RE: RPL/2 - lost2 - 10-18-2017, 02:48 PM
RE: RPL/2 - pier4r - 10-17-2017, 02:51 PM
RE: RPL/2 - JKB - 10-17-2017, 03:04 PM
RE: RPL/2 - JKB - 06-22-2018, 05:30 PM
RE: RPL/2 - compsystems - 06-22-2018, 06:53 PM
RE: RPL/2 - JKB - 06-22-2018, 09:50 PM
RE: RPL/2 - pier4r - 06-23-2018, 10:20 AM
RE: RPL/2 - JKB - 12-25-2018, 09:16 AM
RE: RPL/2 - edryer - 12-25-2018, 02:43 PM
RE: RPL/2 - pier4r - 12-26-2018, 02:39 PM
RE: RPL/2 - Thomas Klemm - 12-26-2018, 03:37 PM
RE: RPL/2 - pier4r - 12-26-2018, 03:47 PM
RE: RPL/2 - JKB - 12-26-2018, 04:58 PM
RE: RPL/2 - JKB - 12-28-2018, 08:32 AM
RE: RPL/2 - JKB - 02-03-2019, 01:49 PM
RE: RPL/2 - JKB - 02-03-2019, 01:50 PM
RE: RPL/2 - pier4r - 02-03-2019, 07:24 PM
RE: RPL/2 - JKB - 02-03-2019, 10:42 PM



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