So what should I tell a youngster?
If I told him my most productive, commercial work was in
DBASE, BASIC and Assembly his eyes might start to roll.
And he might say "That is so retro!" ::)
If you know Java well you then already know a lot of C++ already.
C++ programmers generally feel that it has features that make it easier to write good, robust, readable and maintainable code in than in C.
If you know Java well you then already know a lot of C++ already.
If you know Java well you then already know a lot of C++ already.I meant to say one could could make a fairly easy transition from C++ to learn Java. But I still stand by my statement that learning C is a waste of time. You may want to look over or read some things about C, but taking a class entirely about C is a waste of time.
BC,
VB6 is just as great as .NET in my opinion(it doesnt bloat up your system as much as VB6) ;)
VB6 is just as great as .NET
QuoteVB6 is just as great as .NET
I think VB6 is better that .NET,
becaue ,NET is a cruel, oppressive monster that
Microsoft wants to impose of on everyone.
BC,
VB6 is just as great as .NET in my opinion(it doesnt bloat up your system as much as VB6) ;)
no now.
Public Function GetDriveForNtDeviceName( _
ByVal sDeviceName As String) As String
Dim sFoundDrive As String
Dim strdrives As String
Dim DriveStr() As String
Dim vDrive As String, i As Long, ret As Long
strdrives = Space$(256)
ret = GetLogicalDriveStrings(255, strdrives)
strdrives = Trim$(Replace$(strdrives, vbNullChar, " "))
DriveStr = Split(strdrives, " ")
'For Each vDrive In GetDrives()
For i = 0 To UBound(DriveStr)
vDrive = DriveStr(i)
If StrComp(GetNtDeviceNameForDrive(vDrive), sDeviceName, vbTextCompare) = 0 Then
sFoundDrive = vDrive
Exit For
End If
Next i
GetDriveForNtDeviceName = sFoundDrive
End Function
Dim s1 As Integer
Dim s2 As Integer
Dim s3 As Integer
Private Declare Function BeepAPI Lib "kernel32" Alias "Beep" (ByVal dwFrequency _
As Long, ByVal dwMilliseconds As Long) As Long
Private Sub btnPull_Click()
If bag.Text = "0" Then
MsgBox ("Your Broke! Game Over"), , "Game Over"
End
Else
If Coins.Text = "" Then
MsgBox ("Insert a coin to play"), , "No Coin"
Else
bag = bag - 1
Randomize
s1 = Int(Rnd * 4)
s2 = Int(Rnd * 4)
s3 = Int(Rnd * 4)
BeepAPI 600, 100
'picture 1
If s1 = 0 Or s1 = 3 Then
Pic1.Picture = LoadPicture(App.Path & "\b.bmp")
End If
If s1 = 1 Then
Pic1.Picture = LoadPicture(App.Path & "\c.bmp")
End If
If s1 = 2 Then
Pic1.Picture = LoadPicture(App.Path & "\s.bmp")
End If
'picture 2
If s2 = 0 Or s2 = 3 Then
Pic2.Picture = LoadPicture(App.Path & "\b.bmp")
End If
If s2 = 1 Then
Pic2.Picture = LoadPicture(App.Path & "\c.bmp")
End If
If s2 = 2 Then
Pic2.Picture = LoadPicture(App.Path & "\s.bmp")
End If
'picture 3
If s3 = 0 Or s3 = 3 Then
Pic3.Picture = LoadPicture(App.Path & "\b.bmp")
End If
If s3 = 1 Then
Pic3.Picture = LoadPicture(App.Path & "\c.bmp")
End If
If s3 = 2 Then
Pic3.Picture = LoadPicture(App.Path & "\s.bmp")
End If
If s1 = 1 And s2 = 1 And s3 = 1 Then
BeepAPI 800, 100
BeepAPI 900, 100
MsgBox ("You Win 5 Coins!"), , "Win"
bag = 5 + bag
End If
If s1 = 2 And s2 = 2 And s3 = 2 Then
BeepAPI 800, 100
BeepAPI 900, 100
MsgBox ("Jack-Pot! 20 Coins!"), , "Win"
bag = 20 + bag
End If
End If
End If
End Sub
Private Sub Form_Load()
bag.Text = bag
bag = 50
End Sub
Dim s1 As Integer
Dim s2 As Integer
Dim s3 As Integer
That is so pointless.And I don't want to see any more:Code: [Select]Dim s1 As Integer
That is so pointless.
Dim s2 As Integer
Dim s3 As Integer
Dim s1%,s2%,s3%
Dim s(1 to 3) as Integer
learn Java in 24 hours!"
Quotelearn Java in 24 hours!"
...was that anything like "Learn Red Hat Linux in 21 Days" ?
Got rid of that book after two years.
VB6 is able to do variant types, -Right?
So it should know if you need Integer or not.
(Or am I thinking VB script.)
Just don't dim anything!. It should work anyway!
And if it goes slower, it is more fun!
[/color]
Private Function Multiply(ByVal Multiplicand1,ByVal Multiplicand2,Byval Multiplicand3)
Multiply = Multiplicand1 * Multiplicand2 * Multiplicend3
end Function
This is all very interesting. And it could illustrate why a Microsoft language is not a good place for a newbie to start out.
At first, the Microsoft Basic implementations were quite attractive. But then as the operating system changed, Microsoft decided to make even more changes to Visual Basic. More than perhaps needed to be a Basic language..
A student language has a strong structure and can do what it needs to do without the need to implement something different or deviant from the original design of that language.
Besides, there is usually some type of trapdoor available in most implementations to break out from the structure and do something in another language. In the older versions of BASIC you could peek and poke and then call machine code and outperform some oddball thing.
Thank you all for your input. :D