! bn_ef_v5d_strings.jnl
! Taken out of bn_strings, because it calls so file writev5d.
! testing string argument to external function.
! 5/4/05 acm
exit/script ! I dont have writev5d on this machine.
set mode ignore_error

sp rm -f testa.v5d
let a = "testa.v5d"

use gt4d011.cdf
def axis/y=1:100:1/units=degrees yax
let tr = temp[gy=yax@asn]
go vis5d_write " " tr

load WRITEV5D(tr[i=95:100,j=1:40,k=1:3],1/0,1/0,1/0,1/0,1/0,1/0,1/0,a)
sp ls -l testa.v5d

can region
let vflag = writev5d(tr, 0, 0, 0, 0, 0, 0, 0, "vis5d_out.v5d")
load vflag

sp rm -f test.v5d
load WRITEV5D(tr[i=95:100,j=1:40,k=1:3],1/0,1/0,1/0,1/0,1/0,1/0,1/0,"test.v5d")
sp ls -l test.v5d

! removed because it is internal and largely unintelligible
!show mem/all
!cancel mem/all
!show mem/all

! test error: non-string argument passed
set mode ignore
  load WRITEV5D(tr[i=95:100,j=1:40,k=1:3],1/0,1/0,1/0,1/0,1/0,1/0,1/0,55.0)
set mode/last ignore
