START
Hello Atari
The smallest step: text, a variable and a calculation.
Print "Hello Atari TT!"
Dim answer As Integer = 6 * 7
Print answer
End… downloads
READ / COPY / TRY
Short pieces BASIC for your next idea. Copy an excerpt or download the complete source.
START
The smallest step: text, a variable and a calculation.
Print "Hello Atari TT!"
Dim answer As Integer = 6 * 7
Print answer
EndFOUTEN
Catch an error from a function and move on. Throw creates its own error message. Finally is not yet supported.
' Catch errors here, or in a method called from Try.
Function Divide(a As Double, b As Double) As Double
Return a / b
End Function
Try
Print Divide(42, 0)
Catch message As String
Print "Recovered: " & message
End Try
Try
Throw "An application-defined error"
Catch message As String
Print message
End Try
Print Divide(84, 2)GETALLEN
View the included demonstration of numeric types, calculations and arrays.
Dim values(2) As Integer
values(0) = 6
values(1) = 7
Print values(0) * values(1)GEM
This small form shows a drop-down list. The full CONTROLS project also includes multiselect, a ComboBox, radio groups and MessageBox.
Dim form As New Window("Mijn eerste app", 320, 200)
Dim choices As New ListBox(form, 16, 16, 200, 100)
choices.AddItem("Atari TT")
choices.AddItem("GEM")
form.Show()
Application.Run()MELDING
Use the result value to continue. Combine button and icon constants with +.
Dim answer As Integer
answer = MessageBox.Show("Doorgaan?", MessageBox.YesNo + MessageBox.Question, "TT BASIC")
If answer = MessageBox.Yes Then
Print "We gaan verder"
End IfMIDI
Dry-run: This code does not send MIDI to your equipment. The output shows which messages would be sent. The full DX7 project contains more examples.
Midi.EnableOutput(False)
Midi.NoteOn(1, 60, 100)
Midi.NoteOff(1, 60)For examples with Imports or a .TBP project, use the full package so that all necessary files are together.
Tell us what you make, ask a question or share your experience with the development environments.
The count starts with this update; previous downloads are unknown. ZIP packages and ST images count, not unique individuals.
Loading comments…