Arc Forumnew | comments | leaders | submitlogin
1 point by jsgrahamus 2184 days ago | link | parent

I really should learn to read and understand before

writing....

arc> (w/infile inf dev

        (whiler l (read inf) nil (prn "{" l "}")))
Here is a sample of the output:

{Arcanobacterium}

{has}

{been}

{strongly}

{associated}

{with}

{pharyngitis}

{(fn (_) (often with the presence of scarlatiniform rash))}

Error: "c:/Users/Steve/Desktop/mbrm-new.txt::13563: read:

illegal use of \".\""

It is odd that it errored and that it is only picking up a

word at a time instead of a line.



1 point by jsgrahamus 2184 days ago | link

Reading comes to the rescue again:

arc> dev

"c:/users/steve/desktop/mbrm-new.txt"

arc> (w/infile inf dev

        (whiler l (readline inf) nil (prn l)))
...

VZ Varicella zoster virus Varicella zoster virus

VZV Varicella Varicella Zoster isolated

W White White

WADA Wangiella dermatitidis Wangiella dermatitidis

WBCS WBCs seen WBCs seen

WDER Wangiella dermatitidis Wangiella dermatitidis W. dermatitidis

WESP Weeksella species Weeksella species Weeksella sp.

WEVI Weeksella virosa Weeksella virosa W. virosa

WEZO Weeksella zoohelcum Weeksella zoohelcum W. zoohelcum

WHITE White White

WNF Normal flora also recovered Normal flora also recovered

WOO The specimen was collected The specimen was collected with a wooden shafted swab. Wood components may inhibit virus isolation. Interpret these negative results with caution.

...

nil ...

-----

1 point by waterhouse 2184 days ago | link

The "read" procedure will read only a single Arc expression at a time. If you want to read a line, there is a "readline" procedure.

Also, it is correct that you make code look like code by putting two spaces before each line of code.

  After "code." in the above paragraph, there is a newline, then
  another newline, then two spaces, then "After [...] newline, then",
  then another newline, then two spaces, then "another", and so on.

-----

1 point by jsgrahamus 2184 days ago | link

See reply.

-----

1 point by jsgrahamus 2184 days ago | link

Thanks for the editing tips.

  arc> dev
  "c:/users/steve/desktop/mbrm-new.txt"
  arc> (w/infile inf dev
          (whiler l (readline inf)
             nil
             (if (no (is l "\r"))
                 (prn l))))

  ...
   
  YT      Yeast   Yeast   Yeast
  YTNC    Yeast not Cryptococcus  Yeast not Cryptococcus  Yst not Cryptococcus
  YTSP    Yeast species   Yeast species   Yeast sp.nentgd  Group D, streptococcus  Group D, streptococcus  Group D
  oi      Over-inoculated Over-inoculated Over-inoculated
  orgnv   Organism non-viable     Organism non-viable     Organism non-viable
  oxnego  Oxidase Negative Other  Oxidase Negative Other  Oxidase Negative
  p27853  Pseudomonas aeruginosa ATCC 27853       Pseudomonas aeruginosa ATCC 27853       P. aerug ATCC27853
  pacica  Presumptive Acinetobacter lwoffi        Presumptive Acinetobacter lwoffi        Presumptive A.lwoffi
  stlu    Staphylococcus lugdunensis      Staphylococcus lugdunensis (coagulase negative species) S. lugdunensis
  nil
  arc>

-----