File:  [CSRG BSD Unix] / 43BSD / contrib / icon / libtest / t-complex.icn
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:55 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43
BSD 4.3

link "../ilib/complex"

procedure main()
  x := list(6)
   while s1 := read() do {
      s2 := read() | stop()
      x[1] := strcpx(s1)
      x[2] := strcpx(s2)
      x[3] := cpxadd(x[1],x[2])
      x[4] := cpxdiv(x[1],x[2])
      x[5] := cpxmul(x[1],x[2])
      x[6] := cpxsub(x[1],x[2])
      every write(cpxstr(!x))
      }
end

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.