Category:FutureBasic: Difference between revisions

m
No edit summary
Line 24:
The FB 6 IDE consists of a syntax-aware editor, and a translator (FBtoC) that converts FB code into C code. The translation is then compiled with the system compiler clang.
 
Here is's a sample program:
<pre>
 
// Build a basic window.
window 1, @"Hello, worldWorld!", (0,0,550,400)
// Add a button to the window
button 1,,, @"BeepClick me"
 
// Add a dialog function to handle control events
local fn DoDialog( ev as long )
if ( ev == _btnClick ) then beepprint "Hello, World!"
end fn
 
// Iniitalize the dialog function
window 1, @"Hello, world!", (0,0,550,400)
button 1,,, @"Beep"
 
on dialog fn DoDialog
 
// Run the main event loop
HandleEvents
</pre>
715

edits