Blog Options
Archive
<< April 2024 >>-
Wednesday 17
- New free component for sophisticated file uploads with TMS WEB Core -
Tuesday 16
- Closing the gap with TMS FNC UI Pack new additions -
Thursday 11
- Unveiling the Latest Enhancements in TMS VCL UI Pack -
Friday 5
- TMS components and Delphi and C++Builder 12.1 -
Wednesday 3
- Customizing the login page of your application using TMS Sphinx
- A Python library for using StellarDS.io effortlessly
- Introducing: How it Works with Holger - Building a Pexels gallery app with TMS WEB Core video series
- TMS FNC Cloud Pack with StellarDS.io backend: unparalleled productivity in VCL & FMX
Authors
- Bernard Roussely (1)
- Wagner Landgraf (82)
- Roman Yankovsky (2)
- Bart Holvoet (27)
- Aaron Decramer (17)
- Pieter Scheldeman (99)
- Nancy Lescouhier (32)
- Adrian Gallero (33)
- Bruno Fierens (403)
- Marcos Douglas B. Santos (5)
- Wagner R. Landgraf (1)
- Bradley Velghe (16)
- Bernard (2)
- Andrew Simard (86)
- Holger Flick (15)
- Gjalt Vanhouwaert (30)
- Tunde Keller (22)
- Masiha Zemarai (119)
Blog
All Blog Posts | Next Post | Previous PostScripter Studio - new language features for VBScript / Visual Basic users
Bookmarks:Wednesday, May 13, 2009
The latest releases of TMS Scripter Studio and TMS Scripter Studio Pro included several improvements in Basic language syntax. End-users that are used to VBScript and Visual Basic programming will feel much more comfortable with the recent releases. Here is a summary of the improvements:new statement
To create instances of new classes, you can use new statement with the same parameters as the Create constructor:MyVar = new TLabel(Self)
const and var declarations
In previous versions you couldn't declare constants in Basic syntax using the "const" keyword. Now you can do that, and even better, you can also initialize variables with default valuesconst Msg = "Hello World" Dim A as Integer = 5
Private and Public declaration
You can now define private variables, subs and functions. When a variable or function is declared as private, it is not accessible by other scripts. The default is public. Some examples:DIM A as Integer 'public Private B as String 'private Public C as Char 'public 'public sub SUB DoSomething End Sub 'private function Private Function MyFunction End Function
Return statement
You can use Return statement to leave a sub of function, and return a value (only in functions, of course):Function Max(A, B) If (A > B) Then Return A Else Return B End if End Function
Single line If
There is no need anymore to end an "If" statement with "End If" if the whole statement is in a single line:If (A > B) then MsgBox("A is higher the B")
Try..Catch..End Try
Just like in Pascal you could use Try..Except..End keywords in Basic to build a exception-catching block. This is still valid, but now you can also use Catch..End Try keywords:try C = A / B catch MsgBox("Wrong division") end try
Wagner Landgraf
Bookmarks:
This blog post has not received any comments yet.
All Blog Posts | Next Post | Previous Post