#
# kihonb.rb
#   $Id: kihonb.rb,v 1.2 2000/11/18 19:03:34 keiko Exp $
#


require "narray"
require "numru/dcl"
include NumRu
include Math


nmax = 9
y = NArray.sfloat(nmax)

#-- graph ---
iws = (ARGV[0] || (puts ' WORKSTATION ID (I)  ? ;'; DCL::sgpwsn; gets)).to_i
DCL::sgopn iws

DCL::sgfrm

x1 = 0.1
x2 = 0.9
xc = 0.5

#-- 罫線 ----
for n in 1..nmax
  y[n-1] = 0.1*(10-n)
  DCL::sglnv(x1, y[n-1], x2, y[n-1])
end

DCL::sglnv(xc, 0.05, xc, 0.95)

#-- デフォルト ----
DCL::sgtxv(xc, y[0], 'SGTXV|SUP"RST_SUB"')

#-- 添字 ----
DCL::sglset('LCNTL', true)
DCL::sgtxv(xc, y[1], 'SGTXV|SUP"RST_SUB"')

DCL::sgrset('SMALL', 0.5)
DCL::sgrset('SHIFT', 0.5)
DCL::sgtxv(xc, y[2], 'SGTXV|SUP"RST_SUB"')

#-- フォント ----
DCL::sgtxv(xc, y[3], 'ABCDEFG abcdefg')

DCL::sgiset('IFONT', 2)
DCL::sgtxv(xc, y[4], 'ABCDEFG abcdefg')

DCL::sgstxi(3)
DCL::sgtxv(xc, y[5], 'ABCDEFG abcdefg')

DCL::sgiset('IFONT', 1)
DCL::sgstxi(1)

#-- ギリシャ文字 ----
greek1 = DCL::csgi(128) + DCL::csgi(129) + DCL::csgi(130) + DCL::csgi(131) + DCL::csgi(132) +
         DCL::csgi(133) + DCL::csgi(134) + DCL::csgi(135) + DCL::csgi(136) + DCL::csgi(137)
greek2 = DCL::csgi(152) + DCL::csgi(153) + DCL::csgi(154) + DCL::csgi(155) + DCL::csgi(156) +
         DCL::csgi(157) + DCL::csgi(158) + DCL::csgi(159) + DCL::csgi(160) + DCL::csgi(161)

DCL::sgtxv(xc, y[6], greek1)
DCL::sgtxv(xc, y[7], greek2)

#-- 特殊記号 ----
symbol = DCL::csgi(189) + DCL::csgi(190) + DCL::csgi(191) + DCL::csgi(192) + DCL::csgi(193) +
         DCL::csgi(210) + DCL::csgi(211) + DCL::csgi(212) + DCL::csgi(217) + DCL::csgi(218)

DCL::sgtxv(xc, y[8], symbol)

DCL::sgcls

