Re: Text processing on VMS

Liste des GroupesRevenir à co vms 
Sujet : Re: Text processing on VMS
De : arne (at) *nospam* vajhoej.dk (Arne Vajhøj)
Groupes : comp.os.vms
Date : 14. Oct 2024, 01:39:08
Autres entêtes
Organisation : SunSITE.dk - Supporting Open source
Message-ID : <670c682c$0$705$14726298@news.sunsite.dk>
References : 1 2 3 4 5 6
User-Agent : Mozilla Thunderbird
On 10/13/2024 8:14 PM, Arne Vajhøj wrote:
It is not Java but Groovy, so compile is optional.
The difference is all in the wrapping though.
$ type P.java
import java.nio.file.Files;
import java.nio.file.Paths;
public class P {
     public static void main(String[] args) throws Exception {
         Files.lines(Paths.get("login.com"))
              .filter(line -> line.contains("java"))
              .map(line -> line.substring(2, 13))
              .forEach(System.out::println);
     }
}
$ type s.groovy
import java.nio.file.*
Files.lines(Paths.get("login.com"))
      .filter(line -> line.contains("java"))
      .map(line -> line[2..12])
      .forEach(System.out::println)
$ javac P.java
$ java P
...
$ groovy s.groovy
...
(I don't even have groovysh defined on VMS, so no easy way to try -e)
Arne

Date Sujet#  Auteur
13 Oct 24 * Text processing on VMS17David Meyer
13 Oct 24 +* Re: Text processing on VMS2Chris Townley
14 Oct 24 i`- Re: Text processing on VMS1David Meyer
13 Oct 24 +- Re: Text processing on VMS1Craig A. Berry
13 Oct 24 +* Re: Text processing on VMS12Arne Vajhøj
13 Oct 24 i`* Re: Text processing on VMS11Dave Froble
13 Oct 24 i `* Re: Text processing on VMS10Arne Vajhøj
13 Oct 24 i  +* Re: Text processing on VMS5Craig A. Berry
14 Oct 24 i  i`* Re: Text processing on VMS4Arne Vajhøj
14 Oct 24 i  i +- Re: Text processing on VMS1Arne Vajhøj
14 Oct 24 i  i +- Re: Text processing on VMS1Arne Vajhøj
14 Oct 24 i  i `- Re: Text processing on VMS1Arne Vajhøj
14 Oct 24 i  `* Re: Text processing on VMS4Arne Vajhøj
14 Oct 24 i   +* Re: Text processing on VMS2Simon Clubley
14 Oct 24 i   i`- Re: Text processing on VMS1Arne Vajhøj
14 Oct 24 i   `- Re: Text processing on VMS1Dave Froble
13 Oct 24 `- Re: Text processing on VMS1Stephen Hoffman

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal