
Description
Returns the value of the cookie by specifying a name of a cookie
The value of the cookie is stored on the client computer. You can set cookies using the setcookie() function.

Syntax
ret = getcookie(name)

Parameters

Return Value
| string | : | Cookie | |
| NULL | : | Error or cookie | |

System Return Value
ERROR
| 0 | | Success |
| 1 | | Argument error |
| 11 | | Specified cookie name is not found |

Description
Returns OS environmental variable specified by argument

Syntax
ret = getenv(string)

Parameters
| string | : | Environment variable name |

Return Value
| NULL | : | Error or environment variable | |
| string | : | Environment variable | |

System Return Value
ERROR
| 0 | | Success |
| 1 | | Argument error |
| 8 | | GETENV error |

Example
//[result example]
//
//OS=Windows_NT
//
run()
exit
function run()
print('OS=${getenv("OS")}')
endfunction

Description
(Parases and) Returns the argument specified at command line
If the number of arguments specified, the value of argument will be stored sequentially as array variable
When there is no argument, a prompt will appear. The input character will be retunred.

Syntax
ret = getopt(string,{ … })

Parameters
| string | : | Prompt for asking the user to input Default: 'ARG[n]=' (n represents the number of times the user inputs) |
| { … } | : | multiple strings can be specified. |

Return Value
| NULL | : | Error or character string passed by the user | |
| string | : | Character string passed by the user | |

System Return Value
ERROR
| 0 | | Success |
| 2 | | Output error |
| 3 | | Input error |

Example
//[result example]
//
// input word[1]: h
// input word[2]: e
// input word[3]: l
// input word[4]: l
// input word[5]: o
// input word[6]:
// input word[7]: w
// input word[8]: o
// input word[9]: r
// input word[10]: l
// input word[11]: d
// input word[12]: exit
// input word is hello world
//
exit input_stdin()
function input_stdin()
local i
local input = ''
local word = ''
loop i=1; ; i++
input = getopt('input word[${i}]: ')
if input eq 'q'
print( "input word is ${word}" )
break
else
word = word & input
endif
endloop
endfunction