19/05/2023: A causa di un errore sono stati cancellati, insieme ad account creati da bot, alcuni account legittimi. Si prega di leggere qui: https://www.gambas-it.org/smf/index.php?topic=9733.0
' Visual Basic 6.0Label1.Caption = "Version: " & App.Major & "." & App.Minor & "." _& App.Revision
' Gambas class file : clsVerion' Version Info'' Call as follows:' DIM cVersion as new clsVersion'' Print cVersion.VersionMajor & "." & cVersion.VersionMinor & " Build # " &cVersion.Build'Property Read Version ' Full version eg. 1.2.39Property Read VersionMajor As String ' Major part eg. 1Property Read VersionMinor As String ' Minor Part eg. 2Property Read VersionSmall As String ' Major and Minor eg. 1.2Property Read Build As String ' Revision eg. 39Private Versie As StringPublic Sub _new() Versie = Application.VersionEndPrivate Function Version_Read() As String Return VersieEndPrivate Function VersionMajor_Read() As String Return Left(Versie, InStr(Versie, ".") - 1)EndPrivate Function VersionMinor_Read() As String Return Mid(versie, InStr(Versie, ".") + 1, RInStr(Versie, ".") -InStr(Versie, ".") - 1)EndPrivate Function Build_Read() As String Return Right(Versie, RInStr(Versie, ".") - 2)EndPrivate Function VersionSmall_Read() As String Return Left(Versie, RInStr(Versie, ".") - 1)End' ============= End of Class =============
Application.Version.Split(".")[0] ' for the major Application.Version.Split(".")[1] ' for the minor Application.Version.Split(".")[2] ' for the revision
Label1.Caption = "Version: " & Application.Version
Dim aVersion as String[] = scan(sVersion,"*.*.*") Print aVersion[0]
Dim aVersion As String[] = Scan(Application.Version, "*.*.*") Print aVersion[0]
Print Split(Application.Version, ".")[0]
Print Application.Version.Split(".")[0]
Print "Hello World".LenPrint MySTring.Replace("s","t").Replace("O","P")Print "Gambas".Mid(3,4) ----> mbas