Search found 237 matches

by demosthenesk
Dec 22, 2023 7:09
Forum: Community Discussion
Topic: anyone remember this book?
Replies: 6
Views: 959

Re: anyone remember this book?

oyster wrote: Dec 22, 2023 5:14 thanks
QBasic games and more! Fred Sexton Jr, QBasic. Published in 1994
seems to be that one

The bad news is we can't find a e-book copy
There is a paper book at Amazon
https://www.amazon.com/QBasic-Games-Mor ... 1565292316
by demosthenesk
Sep 06, 2023 19:15
Forum: Projects
Topic: ToyBASIC a FreeBASIC interpreter
Replies: 2
Views: 1593

Re: ToyBASIC a FreeBASIC interpreter

i created a github repo for the ToyBASIC project
https://github.com/demosthenesk/ToyBASIC
by demosthenesk
Sep 06, 2023 13:44
Forum: Projects
Topic: ToyBASIC a FreeBASIC interpreter
Replies: 2
Views: 1593

Re: ToyBASIC a FreeBASIC interpreter

i found the bug....it was my fault not Mid's the correct code lexer.bi ' Simple Lexer in FreeBASIC ' Define token types Enum TokenType TOKEN_EOF = 0 TOKEN_IDENTIFIER TOKEN_NUMBER TOKEN_PLUS TOKEN_MINUS TOKEN_MULTIPLY TOKEN_DIVIDE TOKEN_LEFT_PAREN TOKEN_RIGHT_PAREN End Enum ' Define a data structure ...
by demosthenesk
Sep 06, 2023 13:02
Forum: Projects
Topic: ToyBASIC a FreeBASIC interpreter
Replies: 2
Views: 1593

ToyBASIC a FreeBASIC interpreter

Hello, i try to learn to write an interpreter in FB. I wrote a simple lexer and try it... I think there is a bug in Mid() function. In my project it returns 2 chars why ? Am i wrong ? lexer.bi ' Simple Lexer in FreeBASIC ' Define token types Enum TokenType TOKEN_EOF = 0 TOKEN_IDENTIFIER TOKEN_NUMBER...
by demosthenesk
Aug 24, 2023 22:02
Forum: Libraries & Headers
Topic: FLTK headers for FreeBasic OOP (no C wrapper)
Replies: 232
Views: 26555

Re: FLTK headers for FreeBasic OOP (no C wrapper)

angros47 wrote: Aug 24, 2023 20:48 Actually it's not copyright, it's copyleft ;-)

BTW, did it work for you?
yes i have downloaded the latest headers and it works fine
by demosthenesk
Aug 24, 2023 20:26
Forum: Libraries & Headers
Topic: FLTK headers for FreeBasic OOP (no C wrapper)
Replies: 232
Views: 26555

Re: FLTK headers for FreeBasic OOP (no C wrapper)

i think that copyright is for the c++ code...
The freebasic code is the translate by the developer who wrote it and it is not copyrighted by the c++ developers of the example....
by demosthenesk
Aug 22, 2023 16:37
Forum: Libraries & Headers
Topic: FLTK headers for FreeBasic OOP (no C wrapper)
Replies: 232
Views: 26555

Re: FLTK headers for FreeBasic OOP (no C wrapper)

I guess it can be declared as declare function fl_open_uri(uri as const zstring ptr, msg as zstring ptr= 0, msglen as long = 0) as long test it to see if it has to be inside an 'extern "c" ' or extern "c++" ' block But, why do you need that command? Can't you just do something l...
by demosthenesk
Aug 22, 2023 15:47
Forum: Libraries & Headers
Topic: FLTK headers for FreeBasic OOP (no C wrapper)
Replies: 232
Views: 26555

Re: FLTK headers for FreeBasic OOP (no C wrapper)

I was started to writing a book about FLTK and FreeBASIC. It is based on fltk-1.3.5.pdf documentation and example code by Angelo Rosina (angros47) and me Demosthenes Koptsis (demosthenesk). Soon available... https://github.com/demosthenesk/Getting-started-with-FLTK-and-FreeBASIC-Book https://i.post...
by demosthenesk
Aug 22, 2023 10:14
Forum: Libraries & Headers
Topic: FLTK headers for FreeBasic OOP (no C wrapper)
Replies: 232
Views: 26555

Re: FLTK headers for FreeBasic OOP (no C wrapper)

Another FLTK example.... we have a window with a menu bar... #include once "FLTK/Fl_Window.bi" #include once "FLTK/Fl_Menu_Bar.bi" #include once "FLTK/filename.bi" ' This callback is invoked whenever the user clicks an item in the menu bar Sub MyMenuCallback(w as Fl_Wid...
by demosthenesk
Aug 22, 2023 10:04
Forum: Libraries & Headers
Topic: FLTK headers for FreeBasic OOP (no C wrapper)
Replies: 232
Views: 26555

Re: FLTK headers for FreeBasic OOP (no C wrapper)

Another FLTK example... we have a window with a tree widget... #include once "FLTK/Fl_Double_Window.bi" #include once "FLTK/Fl_Menu_Bar.bi" #include once "FLTK/Fl_Tree.bi" 'Tree's callback 'Invoked whenever an item's state changes. 'This callback is invoked whenever the...
by demosthenesk
Aug 22, 2023 10:00
Forum: Libraries & Headers
Topic: FLTK headers for FreeBasic OOP (no C wrapper)
Replies: 232
Views: 26555

Re: FLTK headers for FreeBasic OOP (no C wrapper)

angros47 wrote: Aug 22, 2023 5:58 Sorry, I meant in Fl_Tree.bi
ok! That has fix the problem...

angros47, did you pass these fixes to github ?
by demosthenesk
Aug 22, 2023 5:13
Forum: Libraries & Headers
Topic: FLTK headers for FreeBasic OOP (no C wrapper)
Replies: 232
Views: 26555

Re: FLTK headers for FreeBasic OOP (no C wrapper)

angros47 wrote: Aug 21, 2023 21:17 In Fl_Tree_Prefs.bi, change:

Code: Select all

private function Fl_Tree.prefs() byref as const Fl_Tree_Prefs 
	return prefs
end function
To

Code: Select all

private function Fl_Tree.prefs() byref as const Fl_Tree_Prefs 
	return _prefs
end function
there is no private function Fl_Tree.prefs() in Fl_Tree_Prefs.bi
by demosthenesk
Aug 21, 2023 20:45
Forum: Libraries & Headers
Topic: FLTK headers for FreeBasic OOP (no C wrapper)
Replies: 232
Views: 26555

Re: FLTK headers for FreeBasic OOP (no C wrapper)

angros47 wrote: Aug 21, 2023 20:34 Sorry, should have been:

Code: Select all

	fl_graphics_driver_->color(r, g, b)
My mistake
yes... i thought it too..

now i get only
warning: infinite recursion
by demosthenesk
Aug 21, 2023 19:42
Forum: Libraries & Headers
Topic: FLTK headers for FreeBasic OOP (no C wrapper)
Replies: 232
Views: 26555

Re: FLTK headers for FreeBasic OOP (no C wrapper)

In the file "fl_draw.bi", replace the lines: private sub fl_color overload(r as ubyte, g as ubyte, b as ubyte) fl_color(r, g, b) end sub with: private sub fl_color overload(r as ubyte, g as ubyte, b as ubyte) fl_graphics_driver_->fl_color(r, g, b) end sub See if it gets rid of the warning...