Location

From NSB App Studio
Revision as of 15:57, 27 November 2012 by WinVetPro (talk | contribs) (→‎Example)
Jump to navigation Jump to search

Location[(string | variable)]

Description

Location lets you get or set the name of the current app. It will return the URL of the current app that you are running. If you want to run another app, assign the URL of that app to Location. In this respect, it works similarly to the Chain statement found in some other implementations of BASIC.

To send parameters to the next app, put a question mark (?) followed by the string after the new app name.

Example

Rem Location Example
MsgBox "The name of this app is " & location
MsgBox "Going to http://www.nsbasic.com/Project1/index.html?someParameters"
location = "http://www.nsbasic.com/Project1/index.html?someParameters"
…
Rem PROJECT1
MsgBox "Started with parameter " & location.search

Output

?someParameters