Search found 7061 matches

by D.J.Peters
Nov 14, 2018 7:24
Forum: Libraries
Topic: FLTK C for FreeBASIC Jan 09, 2017
Replies: 169
Views: 21774

Re: FLTK C for FreeBASIC Jan 09, 2017

I'm working in my rare spare time on a new FLTK add on. May be my next Christmas gift for you. It becomes easier than ever before :-) Joshy http://shiny3d.de/public/libs/fltk-c/addon.png Old C style: #include once "fltk-c.bi" sub ButtonClick cdecl (byval button as FL_WIDGET ptr, byval arg ...
by D.J.Peters
Nov 06, 2018 1:24
Forum: General
Topic: How to grab escape-sequence keycodes?
Replies: 8
Views: 201

Re: How to grab escape-sequence keycodes?

If you read from stdin you use

Open Cons For Input As #hFile

then my posted solution will work

if not why

you can post the code also

Joshy
by D.J.Peters
Nov 06, 2018 0:58
Forum: General
Topic: Russian Sorting Halves Danilin
Replies: 11
Views: 267

Re: Russian Sorting Halves Danilin

I would name it split sort :-) (see function arraySplit) Joshy 'function arraySplit(outArray() as integer, _ inArray() as integer, _ startIndex as integer, _ lastIndex as integer,_ iDiv as integer) as integer dim as integer splitPoint FOR i as integer=startIndex TO lastIndex splitPoint += inArray(i)...
by D.J.Peters
Nov 05, 2018 23:45
Forum: General
Topic: How to grab escape-sequence keycodes?
Replies: 8
Views: 201

Re: How to grab escape-sequence keycodes?

var hFile = FreeFile() Open Cons For Input As #hFile var aborted=false while aborted = false var ASingleChar = Input(1,hFile) if ASingleChar<>"" then if ASingleChar[0] = 1 then var TwoChars = Input(2,hFile) if TwoChars[0]=64 andalso TwoChars[1]=13 then print "F1 are pressed !" e...
by D.J.Peters
Nov 05, 2018 23:24
Forum: General
Topic: Russian Sorting Halves Danilin
Replies: 11
Views: 267

Re: Russian Sorting Halves Danilin

'RUSSIAN sorting halves 4 part bubble RANDOMIZE TIMER const as integer N = 17539 DIM as integer d(1 to N), a(1 to N), v(1 to N), q(1 to 5) FOR i as integer =1 TO N d(i)=INT(RND * N) NEXT print "DA RUS 4 start" dim as double start=TIMER dim as integer summa FOR i as integer=1 TO N summa +=...
by D.J.Peters
Nov 05, 2018 22:35
Forum: General
Topic: How to grab escape-sequence keycodes?
Replies: 8
Views: 201

Re: How to grab escape-sequence keycodes?

"... Inkey, Getkey, and Multikey ..."

What have this functions to do with a RS-232 connection ?

In FreeBASIC a RS-232 connection is like a file read / write operation.

/wiki/KeyPgOpenCom

Joshy
by D.J.Peters
Nov 04, 2018 22:28
Forum: General
Topic: Illegal non-static member access
Replies: 16
Views: 237

Re: Illegal non-static member access

Code: Select all

type tEventHandler as sub()
type TMenu : as tEventHandler clickhandler : end type
type TForm : as TMenu menu : end type
sub MenuItemClick()
   print "menu item 1"
end sub
dim as TForm myForm
myForm.menu.clickhandler = @MenuItemClick
sleep
by D.J.Peters
Nov 04, 2018 21:47
Forum: General
Topic: SUB pointer and optional single ANY PTR parameter
Replies: 9
Views: 142

Re: Procedure pointer and optional ANY PTR parameter

@fxm it's a tiny bug but a bug is a bug :-) The lexer has a problem if the only param are of type "any" and has a default value of "NULL" Joshy Type TANY As any ptr Sub test (byval first as integer=0, Byval second As TANY=0) End Sub test():test(1):test(,0):test(1,0) Dim As Sub (b...
by D.J.Peters
Nov 04, 2018 13:02
Forum: DOS
Topic: Custom C64 eumlator crashes in FreeDOS
Replies: 10
Views: 251

Re: Custom C64 eumlator crashes in FreeDOS

Why do you allocate 560 MB ?

Joshy
by D.J.Peters
Nov 03, 2018 23:10
Forum: DOS
Topic: Custom C64 eumlator crashes in FreeDOS
Replies: 10
Views: 251

Re: Custom C64 eumlator crashes in FreeDOS

print (&H10FFFFFF*2 + &H00FFFFFF) / (1024*1024)
sleep

You allocate 560 MB in DOS or DOSBOX that must fail !

it's a crime what you do with my elegant code ;-)

Joshy
by D.J.Peters
Nov 01, 2018 11:38
Forum: Beginners
Topic: How to load a .jpg file [SOLVED]
Replies: 7
Views: 269

Re: How to load a .jpg file [SOLVED]

May be FBImage is the key :-)

viewtopic.php?f=14&t=24105

Joshy
by D.J.Peters
Nov 01, 2018 1:20
Forum: General
Topic: strange bug, FB win64
Replies: 9
Views: 201

Re: strange bug, FB win64

No problem here ! Joshy D:\FreeBASIC>fbc64.exe -v -w all -Wc -O2,-mfpmath=387 test.bas FreeBASIC Compiler - Version 1.06.0 (07-03-2018), built for win64 (64bit) Copyright (C) 2004-2016 The FreeBASIC development team. standalone target: win64, x86-64, 64bit compiling: test.bas -o test.c (main module)...
by D.J.Peters
Oct 31, 2018 17:40
Forum: Projects
Topic: FreeBasic IDE-poseidonFB(Update 2018.10.27)
Replies: 938
Views: 76837

Re: FreeBasic IDE-poseidonFB(Update 2018.10.27)

may be simple to fix: Menu project save all closed all loaded projects here ! It crashed from time to time if I open a file from left project panel while other open files are exists in the tab's. The problem are I can not reproduce this crashes. First I was thinking it happens only if I have 300 or ...
by D.J.Peters
Oct 29, 2018 20:00
Forum: Tips and Tricks
Topic: Simple lzw encoder - decoder without dependance
Replies: 6
Views: 366

Re: Simple lzw encoder - decoder without dependance

I would like to see a version of deflate and inflate
without any dependency only a *.bi file.

it's a pert of zlip or libz I don't know.

How ever thank you for your LZW port.

Joshy
by D.J.Peters
Oct 26, 2018 16:15
Forum: Tips and Tricks
Topic: 3 Concepts, same Result
Replies: 33
Views: 1043

Re: 3 Concepts, same Result

Happy Birthday dodicat.
it's weekend made your day or night a unforgettable event.

I hope I will get 70 too in future
but I can't stop smoking so i'm not sure about that.

Joshy

Go to advanced search