![]() It can include information such as developed by, modified by and it can also include incorporated logic. ![]() Comments in VBScriptĬomments are used to document the program logic and the user information with which other programmers can seamlessly work on the same code in future. So identifiers int_counter, INT_Counter and INT_COUNTER have the same meaning within VBScript. This means that language keywords, variables, function names and any other identifiers need NOT be typed with a consistent capitalization of letters. These reserved words SHOULD NOT be used as a constant or variable or any other identifier names. The following list shows the reserved words in VBScript. ![]() The following example illustrates how to work with multiple lines.ĭocument.write("The Sum of two numbers"&_"var1 and var2 is " & Sum) This improves the readability of the code. When a statement in VBScript is lengthy and if user wishes to break it into multiple lines, then the user has to use underscore "_". Hence, in VBScript, Colons act as a line separator. Single Line SyntaxĬolons are used when two or more lines of VBScript ought to be written in a single line. Unlike JavaScript, no statement terminators such as semicolon is used to terminate a particular statement. VBScript is based on Microsoft's Visual Basic. One can use spaces, tabs, and newlines freely within the program, so you are free to format and indent your programs in a neat and consistent way that makes the code easy to read and understand. VBScript ignores spaces, tabs, and newlines that appear within VBScript programs. ![]() So, above code will display following result − This function can be used to write text, HTML or both. In the above example, we called a function document.write, which writes a string into the HTML document. ![]() Let us write a VBScript to print out "Hello World". ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |