Java web server - CHAPTER 5 STORING AND RETRIEVING APPLICATION DATA
CHAPTER 5 STORING AND RETRIEVING APPLICATION DATA Tip Always be sure to assign a value to your variables. If you forget, REALbasic will substitute a default value, which can create unpredictable results in your applications. For example, if you fail to assign a value to a variable with a numeric data type, REALbasic assigns a default value of 0. Similarly, if you fail to assign a value to a variable that stores string data, REALbasic automatically assigns an empty string (”") as the variable s default value. REALbasic is flexible in the manner in which it enables you to declare variables. For example, it lets you declare more than one variable of the same data type at a time using a single Dim statement, as the following shows. Dim strFirstName, strLastname As String REALbasic lets you mix and match data types in declaration statements, as you see here. Dim strUserName As String, strUserAge as Integer REALbasic also enables you to assign a value to a variable at the same time you declare it, as the following shows. Dim strPlayAgain As Boolean = False Note One thing REALbasic does not do, and this may surprise Visual Basic programmers, is let you implicitly create variables simply by referencing them, without first declaring them. CREATING MORE USEFUL VARIABLE NAMES To help make your REALbasic code statements easier to understand, use a variable-naming scheme. For example, going forward, the examples in this book use variables whose names begin with a three-character prefix that identifies their data type. In addition, the names assigned to all variables attempt to describe their use or contents. Examples of common prefix characters include Boolean - bln Color - clr Double - dbl Integer - int Single -sng String - str Variant - var
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.