LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-21-2005, 10:15 PM   #1
coldmove
LQ Newbie
 
Registered: May 2005
Posts: 7

Rep: Reputation: 0
VB6 Vs gambas


hi,
whether gambas coding style is similar to VB6?
thanx
 
Old 12-21-2005, 10:47 PM   #2
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
From the screenshots at gambas's website, they look pretty similar to me, syntax-wise. Of course, there probably are going to be some differences. But I couldn't tell you for sure since I've never used gambas.
 
Old 12-21-2005, 11:32 PM   #3
Crito
Senior Member
 
Registered: Nov 2003
Location: Knoxville, TN
Distribution: Kubuntu 9.04
Posts: 1,168

Rep: Reputation: 53
I don't know if it's done yet but OpenOffice.org BASIC is so close to VB6 it's scary. Here's some sample code. Note how it uses VB6 style error handling, with on error goto's and labels, not the try/end try exception handling crapolla in VB.NET (which might be fine for other languages but not for BASIC.)

Code:
Function StoreDocument() as Boolean
Dim sCurFileExists as String
Dim iOverWrite as Integer
	If (TargetFile <> "") And (Not bCancelTask) Then
		On Local Error Goto NOSAVING
		If oUcb.Exists(TargetFile) Then
			sCurFileExists = ReplaceString(sMsgFileExists, ConvertFromUrl(TargetFile), "<1>")
			sCurFileExists = ReplaceString(sCurFileExists, chr(13), "<CR>")
			iOverWrite = Msgbox (sCurFileExists, 32 + 3, sMsgDLGTITLE)
			Select Case iOverWrite
				Case 1	' OK
				Case 2 	' Abort
					bCancelTask = True
					StoreDocument() = False
					Exit Function
				Case 7 	' No
					StoreDocument() = False
					Exit Function
			End Select
		End If
		If TargetFile <> SourceFile Then
			oDocument.StoreAsUrl(TargetFile,NoArgs)
		Else
			oDocument.Store
		End If
		StoreDocument() = True
		NOSAVING:
		If Err <> 0 Then
			StoreDocument() = False
			Resume CLERROR
		End If
		CLERROR:
	End If
End Function
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
hierarchical flexgrid in vb6 sudif Programming 0 09-17-2005 10:34 AM
building a three dimensional array in vb6 mrobertson Programming 0 08-18-2005 09:12 AM
Executing an ftp command from vb6 mrobertson Programming 3 07-06-2005 03:42 PM
converting vb6 code to python mrobertson Programming 2 06-02-2005 01:27 PM
VB6 on Visual Studio? mohbana Programming 1 11-23-2004 01:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration