return
Syntax
Details
Example
#
# Download two files into named buffers
# using a subroutine to do so
#
gosub getfile(data1, "http://intranet/datadump1.json")
gosub getfile(data2, "http://someotherserver/anotherfile.xml")
# (Script to do something with the data goes here)
#
# Argument 1: the name of the buffer to store the data
# Argument 2: the URL of the file to download
#
subroutine getfile {
if (${SUBARG.COUNT} != 2) {
print "Error: This subroutine requires two arguments
return
}
buffer ${SUBARG_1} = http GET "${SUBARG_2}"
# There is an implicit 'return' here
}Last updated