which coding style do you prefer ?demosthenesk wrote: ↑Aug 07, 2023 10:58 Example code in Debian 13 Trixie (testing), it works fine, no errors, run successfully
Example1Example2 equivalent with Example1Code: Select all
#include "FLTK_main/Fl_Window.bi" #include "FLTK_main/Fl_Box.bi" Dim As ZString * 13 str1 => "hello, world" Dim fWindow as Fl_Window = Fl_Window(0, 0, 340, 180, str1) Dim fBox as Fl_Box = Fl_Box(20, 40, 300, 100, str1) fBox.box(FL_UP_BOX) fBox.labelfont(FL_BOLD + FL_ITALIC) fBox.labelsize(36) fBox.labeltype(FL_SHADOW_LABEL) fWindow.end_() fWindow.show Fl.run_()
Code: Select all
#include "FLTK_main/Fl_Window.bi" #include "FLTK_main/Fl_Box.bi" Dim fWindow As Fl_Window Ptr Dim fBox As Fl_Box Ptr Dim As ZString * 13 str1 => "hello, world" fWindow = New Fl_Window(0, 0, 340, 180, str1) fBox = New Fl_Box(20, 40, 300, 100, str1) fBox->box(FL_UP_BOX) fBox->labelfont(FL_BOLD + FL_ITALIC) fBox->labelsize(36) fBox->labeltype(FL_SHADOW_LABEL) fWindow->end_() fWindow->show() Fl.run_()
Example1 with methods or Example2 with pointers ?