Re: how to set a standard input to a variable

From: Xie Xin <xiexinyls_at_nyahnyahspammersnyahnyah>
Date: Tue Mar 30 2010 - 21:08:06 MDT

hi,

I guess system func will call a bash subprocess each time. When it
finishes, it does not store your "name" in the memory again. So you
can not get your name with another call to system.

Xin Xie

在 2010年3月31日 上午8:39,chen <fjfzcgh@gmail.com> 写道:
> Dear Sir,
> I want to get a standard input from keyboard and then set it to one
> new variable via ncl. The snippet is as follows,
>
> system("read name")
> var=systemfunc("echo ${name}")
> print(var)
>
>
> But the result just shows a missing value. Why does not it work? Or, any
> alternative method can solve it? Thanks in advance!
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Mar 30 21:08:11 2010

This archive was generated by hypermail 2.1.8 : Thu Apr 01 2010 - 11:31:45 MDT