11.07.2015 Views

webMathematica™ Wolfram - Wolfram Research

webMathematica™ Wolfram - Wolfram Research

webMathematica™ Wolfram - Wolfram Research

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Advanced TopicsThis section discusses a variety of more complicated and advanced details of a webMathematicasite.VariablesThis section discusses the use of variables in webMathematica pages. It covers the way thatinput variables are processed as well as issues, such as scoping, that concern the use of localvariables in code that appears in webMathematica pages.There are three kinds of variables in webMathematica: input variables, page variables, andsession variables. Variables that start with $$ are input variables; they are given values fromthe HTTP request and are cleared when the kernel is cleaned when the page is finished. Variablesthat do not start with $$ only get values if they are assigned values. These assignmentslast until the page is cleared if they are page variables, and for the lifetime of an HTTP sessionif they are session variables.The details of these variables are now discussed.Input VariablesInput variables are named to start with $$ and are given values if their names are sent with theHTTP request. They have a special name because it is important to know which are the inputvariables. In the example below, the input variable $$setting will get the value entered intothe input element (because the input element uses the name setting). You can test if avariable has a value with the MSP function MSPValueQ.If[ MSPValueQ[ $$setting],....]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!