system

functions

NAME

system --- issue a shell command

SYNTAX

system(string)

DESCRIPTION

Executes string as though it had been typed as command to a unix shell from the terminal. HOC waits until the command is completed.

EXAMPLES

system("ls")
Prints a directory listing in the console terminal window. will take up where it left off when the user types the exit command

BUGS

Fully functional on unix.

Does not work on the mac version.

Under mswin, executes the string under the cygwin sh.exe in $NEURONHOME/bin via the wrapper, $NEURONHOME/lib/nrnsys.sh . Normally, stdout is directed to the file tmpdos2.tmp in the working directory and this is copied to the terminal. The neuron.exe busy waits until the nrnsys.sh script creates a tmpdos1.tmp file signaling that the system command has completed. Redirection of stdout to a file can only be done with the idiom "command > filename". No other redirection is possible except by modifying nrnsys.sh .


stopwatch

functions

NAME

startsw, stopsw --- stopwatch

SYNTAX

startsw()
stopsw()

DESCRIPTION

Startsw() initializes the stopwatch. Stopsw() returns the number of seconds since the previous startsw().


neuronhome

functions

NAME

neuronhome -- installation path

SYNTAX

string = neuronhome()

DESCRIPTION

Returns the full installation path in unix format or, if it exists, the NEUROHOME environment variable in unix format.

Note that for unix, it isn't exactly the installation path but the --prefix/share/nrn directory where --prefix is the location specified during installation. For the mswin version it is the location selected during installation and the value is derived from the location of neuron.exe in neuronhome()/bin/neuron.exe. For mac it is the folder that contains the neuron executable program.


winio_show

functions

SYNTAX

winio_show(0or1)

DESCRIPTION

MSWin and Mac version only. Hides or shows the console window.


WinExec

functions

SYNTAX

WinExec("mswin command")

DESCRIPTION

MSWin version only.


unix_mac_pc

functions

SYNTAX

type = unix_mac_pc()

DESCRIPTION

Return 1 if unix, 2 if mac, or 3 if mswin is the operating system. This is useful when deciding if a machine specific function can be called or a dll can be loaded.


nrn_load_dll

functions

SYNTAX

nrn_load_dll(dll_file_name)

DESCRIPTION

MSWin and Mac version only. Loads a dll containing membrane mechanisms.


neuron/general/function/system.hel : 2333 Jul 12