  uses console

  '
  '=============
  class organism
  '=============
  '
  int id,ty
  string formal,informal,descript
  '
  method name(sys n) as string
  '===========================
  if n=0 then
    if len formal then return formal cr
  else
    if len informal then return informal cr
  end if
  end method
  '
  method describe() as string
  '==========================
  if len descript then return descript cr 
  end method
  '
  method lineage(sys n) as string
  '==============================
  sys a
  string lnk
  organism * o
  if n=0 then exit method
  @o=n
  do
    if o.id=0 then exit do
    method= o.name(0) o.name(1) o.describe() lnk cr method
    lnk="-->"
    a=o.ty
    if a=0 then exit do
    'method+=cr
    @o=a
  end do
  end method
  '
  end class

  '
  organism oa[1000]
  '
  function fin(sys n) as sys
  '=======================
  if n then return @oa(n)
  end function
  '
  def in
    oa[%1]={fin(%1),fin(%2),%3,%4,%5}
  end def

'#recordof in
'#recordof fin
  '
  '  ID  TYP FORMAL             INFORMAL              DESCRIPTION
  '========================================================================================
  in 009 000 ""                 "Virtual entity"      ""
  in 010 000 ""                 "Physical entity"     ""
  in 011 009 ""                 "Command"             ""
  in 012 009 ""                 "Maths"               ""
  in 013 009 ""                 "Memory"              ""
  in 016 010 ""                 "Magnetic"            ""
  in 017 010 ""                 "Electromagnetic"     ""
  in 018 010 ""                 "Electrical"          ""
  in 019 010 ""                 "Atomic"              ""
  in 020 010 ""                 "Molecular"           ""
  in 029 020 ""                 "Inorganic chemistry" ""
  in 030 020 ""                 "Organic chemistry"   ""
  in 040 030 ""                 "Self replicator"     ""
  '----------------------------------------------------------------------------------------
  in 050 040 ""                 "Organism"            "Organic life with metabolism"
  in 051 040 ""                 "virus"               "Organic life without metabolism"
  in 060 050 "Bacteria"         "Bacteria"            "cells without nucleus"
  in 061 050 "Archaea"          "Extremophiles"       "Cells tolerant of extreme conditions"
  in 062 050 "Eukarya"          "Eukaryotes"          "cells with nucleus"
  in 063 062 "Protozoa"         ""                    ""
  in 064 062 "Chromista"        ""                    ""
  in 071 063 ""                 "other protists"      ""
  in 072 064 ""                 "Euglenoids"          ""
  in 073 064 ""                 "Apicomplexa"         ""
  in 074 064 ""                 "Haptophytes"         ""
  in 075 064 ""                 "Brown Algae"         ""
  in 076 064 ""                 "Diatoms"             ""
  in 077 064 ""                 "Glaucophytes"        ""
  in 078 062 "Fungi"            "Fungi"               ""
  in 079 062 "Animalia"         "Animals"             ""
  '----------------------------------------------------------------------------------------
  in 080 064 "Rhodophyta"       "Red Algae"           ""
  in 081 064 "Chlorophyta"      "Green Algae"         "green algae (desmids & charophytes)"
  in 110 062 "Plantae"          "Plants"              "green multicellular organisms"
  in 120 110 "Marchantiophyta"  "Bryophytes"          "liverworts"
  in 121 110 "Anthocerotophyta" "Bryophytes"          "hornworts"
  in 122 110 "Bryophyta"        "Bryophytes"          "mosses"
  in 123 110 "Lycopodiophyta"   "Pteridophytes"       "club mosses"
  in 124 110 "Pteridophyta"     "Pteridophytes"       "Ferns, Wisk ferns & horsetails"
  in 125 110 "Cycadophyta"      "Seed plants"         "cycads"
  in 126 110 "Ginkgophyta"      "Seed plants"         "ginkgo"
  in 127 110 "Pinophyta"        "Seed plants"         "conifers"
  in 128 110 "Gnetophyta"       "Seed plants"         "gnetophytes"
  in 129 110 "Magnoliophyta"    "Seed plants"         "flowering plants"
  '----------------------------------------------------------------------------------------
  in 200 079 "Parazoa"          ""                    ""
  in 201 200 "Porifera"         ""                    ""
  in 202 200 "Placozoa"         ""                    ""
  in 203 079 "Eumetazoa"        ""                    ""
  in 204 203 "Radiata"          ""                    ""
  in 205 203 "Bilateria"        ""                    ""
  in 206 205 "Orthonectida"     ""                    ""
  in 207 205 "Rhombozoa"        ""                    ""
  in 208 205 "Acoelomorpha"     ""                    ""
  in 209 205 "Chaetognatha"     ""                    ""
  in 210 205 "Deuterostomia"    ""                    ""
  in 211 210 "Chordata"         ""                    ""
  in 212 210 "Hemichordata"     ""                    ""
  in 213 210 "Echinodermata"    ""                    ""
  in 214 210 "Xenoturbellida"   ""                    ""
  in 215 210 "Vetulicolia"      ""                    ""
  in 300 211 "Tunicata"         ""                    "tunicates; 3,000 species"
  in 310 211 "Cephalochordata"  ""                    "lancelets; 30 species"
  in 320 211 "Vertebrata"       ""                    "vertebrates"
  in 330 320 "Gnathostomata"    ""                    "jawed vertebrates"
  in 340 330 "Placodermi"       ""                    "Paleozoic armoured forms"
  in 350 330 "Chondrichthyes"   ""                    "cartilaginous fish; 900+ species"
  in 360 330 "Acanthodii"       ""                    "Paleozoic spiny sharks"
  in 370 330 "Osteichthyes"     ""                    "bony fish; 30,000+ species"
  in 380 370 "Actinopterygii"   ""                    "ray-finned fish; about 30,000 species"
  in 390 370 "Sarcopterygii"    ""                    "lobe-finned fish: 8 species"
  in 400 330 "Tetrapoda"        ""                    "four-legged vertebrates; 28,000+ species"
  in 410 400 "Amphibia"         ""                    "amphibians; 6,000 species"
  in 420 400 "Reptilia"         ""                    "reptiles; 8,225+ species"
  in 430 400 "Anapsida"         ""                    "extinct proto-reptiles and possibly turtles"
  in 440 400 "Diapsida"         ""                    "majority of reptiles, progenitors of birds"
  in 450 400 "Aves"             ""                    "birds; 8,800–10,000 species"
  in 460 400 "Synapsida"        ""                    "mammal-like reptiles; 4,500+ species, progenitors of mammals"
  in 470 400 "Mammalia"         ""                    "mammals; 5,800 species"
  '----------------------------------------------------------------------------------------
  in 500 470 "Prototheria"      "monotremes"          "echidnas and the Platypus"
  in 510 470 "Theriiformes"     ""                    "live-bearing mammals and their prehistoric relatives"
  in 520 470 "Allotheria"       "multituberculates"   ""
  in 530 470 "Triconodonta"     "triconodonts"        ""
  in 540 470 "Holotheria"       ""                    "modern live-bearing mammals and their prehistoric relatives"
  in 550 540 "Theria"           ""                    "live-bearing mammals"
  in 560 550 "Marsupialia"      "marsupials"          ""
  in 570 560 "Australidelphia"  ""                    "Australian marsupials and the Monito del Monte"
  in 580 560 "Ameridelphia"     ""                    "New World marsupials"
  in 590 540 "Placentalia"      "placentals"          ""
  in 600 540 "Xenarthra"        "xenarthrans"         ""
  in 610 540 "Epitheria"        "epitheres"           ""
  in 620 610 "Anagalida"        ""                    "lagomorphs, rodents, and elephant shrews"
  in 630 610 "Ferae"            ""                    "carnivorans, pangolins, †creodonts, and relatives"
  in 640 610 "Lipotyphla"       "insectivorans"       ""
  in 650 610 "Archonta"         ""                    "bats, primates, colugos, and treeshrews"
  in 670 610 "Ungulata"         "ungulates"           ""
  in 680 670 "Tubulidentata"    ""                    "incertae sedis: aardvark"
  in 690 670 "Eparctocyona"     ""                    "condylarths, whales, and artiodactyls (even-toed ungulates)"
  in 700 670 "Meridiungulata"   ""                    "South American ungulates"
  in 710 670 "Altungulata"      ""                    "perissodactyls (odd-toed ungulates), elephants, manatees, and hyraxes"
  '----------------------------------------------------------------------------------------
  in 800 650 "Primates"         ""                    ""
  in 810 800 "Strepsirrhini"    ""                    "non-tarsier prosimians"
  in 820 810 "Lemuriformes"     ""                    ""
  in 822 820 "Cheirogaleidae"   ""                    "dwarf lemurs and mouse-lemurs 32 species"
  in 824 820 "Daubentoniidae"   ""                    "aye-aye 1 species"
  in 826 820 "Lemuridae"        ""                    "lemurs 22 species"
  in 828 820 "Lepilemuridae"    ""                    "sportive lemurs 26 species"
  in 830 820 "Indriidae"        ""                    "woolly lemurs and allies 19 species"
  in 840 810 "Lorisiformes"     ""                    ""
  in 842 840 "Lorisidae"        ""                    "lorises, pottos and allies 9 species"
  in 844 840 "Galagidae"        ""                    "galagos 19 species"
  in 850 800 "Haplorhini"       ""                    "tarsiers, monkeys and apes"
  in 852 850 "Tarsiiformes"     ""                    ""
  in 854 852 "Tarsiidae"        ""                    "tarsiers 9 species"
  in 860 850 "Anthropoidea"     ""                    ""
  in 862 850 "Parvorder"        "Platyrrhini"         "New World monkeys"
  in 864 862 "Callitrichidae"   ""                    "marmosets and tamarins 42 species"
  in 866 862 "Cebidae"          ""                    "capuchins and squirrel monkeys 17 species"
  in 868 862 "Aotidae"          ""                    "night or owl monkeys (douroucoulis) 10 species"
  in 870 862 "Pitheciidae"      ""                    "titis, sakis and uakaris 42 species"
  in 872 862 "Atelidae"         ""                    "howler, spider and woolly monkeys 28 species"
  in 880 850 "Catarrhini"       ""                    ""
  in 882 880 "Cercopithecoidea" ""                    ""
  in 884 882 "Cercopithecidae"  ""                    "Old World monkeys 135 species"
  in 886 880 "Hominoidea"       ""                    ""
  in 888 886 "Hylobatidae"      ""                    "gibbons or lesser apes 13 species"
  in 900 886 "Hominidae"        ""                    "great apes, including humans 7 species"
  '========================================================================================
  '
  'TEST
  '====

  string pr
  pr="TAXONOMY" cr cr
  pr+=oa.lineage fin 900

  print pr
  'putfile "t.txt",pr
  pause




