bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] apl symbols from a file


From: Elias Mårtenson
Subject: Re: [Bug-apl] apl symbols from a file
Date: Mon, 15 Feb 2016 10:02:40 +0800

The wc command shows the number of bytes by default. If you want to count characters you need to use the flag -m.

As documented in the manual page:

       -c, --bytes
              print the byte counts

       -m, --chars
              print the character counts

Regards,
Elias


On 15 February 2016 at 07:08, <address@hidden> wrote:
Hi Bug APL,

the system's word count mechanism says length four. APL says length three, I thought this was going to be length 1 and the symbol '⍝'. Does anyone know what I am doing incorrectly:

address@hidden:~/aplstuff$ echo "⍝" > txt
address@hidden:~/aplstuff$ cat txt

address@hidden:~/aplstuff$ wc txt
1 1 4 txt
address@hidden:~/aplstuff$ ./wc.apl -q -- txt
      #!/usr/local/bin/apl
      path←∈(⎕ARG ⍳ ⊂'--') ↓ ⎕ARG
      tie←⎕FIO[3] path
      fontents←{⍵, ⎕FIO[6] tie}⍣{⍺⊢⎕FIO[10] tie}''
      fontents←⎕ucs⊃,/⍪(~ fontents∊10 11)⊂fontents     
      fontents
â
     
      ⍴fontents
1 3
      )off



It does not display in my email draft, but APL returns two more symbols after the 'a' with the accent. looks like they have values of 0080 and 0090

-Alex


-Alex


reply via email to

[Prev in Thread] Current Thread [Next in Thread]