Search found 5665 matches

by dodicat
May 03, 2019 21:32
Forum: General
Topic: Constructor in dll
Replies: 18
Views: 404

Re: Constructor in dll

edit Test dll. depends what is inside init. gfx instructions seem to fail api functions seem OK 'tester.bas 'compile -dll #include "windows.bi" type udt as zstring * 20 y as integer n declare constructor declare destructor declare sub show end type constructor udt export y="The year i...
by dodicat
May 03, 2019 20:02
Forum: General
Topic: Constructor in dll
Replies: 18
Views: 404

Re: Constructor in dll

Using sub something constructor fires it up immediately, only direct instructions inside it are available (seems) If another sub is called from the constructor sub, then that other sub won't yet have actually been created, it needs to wait for the constructor sub to have run it's course. Example cal...
by dodicat
May 03, 2019 19:35
Forum: General
Topic: Constructor in dll
Replies: 18
Views: 404

Re: Constructor in dll

Just exports the methods(including constructors/destructors) The dll code 'tester.bas 'compile -dll type udt as zstring * 20 y as integer n declare constructor declare destructor declare sub show end type constructor udt export y="The year is: " n=2019 end constructor destructor udt export...
by dodicat
May 02, 2019 19:01
Forum: Community Discussion
Topic: Challenge : Sfx encrypted file, to verify it's security level
Replies: 9
Views: 345

Re: Challenge : Sfx encrypted file, to verify it's security level

Well marpon, I'm out!
sfx_challenge.exe went straight to quarantine, and on this system it is a one way ticket.(Like a black hole in the centre of Win 10)
by dodicat
May 02, 2019 13:31
Forum: Community Discussion
Topic: Please help me translate this Python code fragment to implement Steam Achievements
Replies: 21
Views: 648

Re: Please help me translate this Python code fragment to implement Steam Achievements

The steam_api.dll is OK with the functions in it.(steam_api.def) Here are my results with steam_api.dll 32 bits. (some prints are commented out, they stop the full run) test code: 'get steam_api.dll #inclib "steam_api" declare function GetHSteamPipe cdecl alias $"GetHSteamPipe" a...
by dodicat
May 02, 2019 13:31
Forum: Community Discussion
Topic: Please help me translate this Python code fragment to implement Steam Achievements
Replies: 21
Views: 648

Re: Please help me translate this Python code fragment to implement Steam Achievements

The steam_api.dll is OK with the functions in it.(steam_api.def) Here are my results with steam_api.dll 32 bits. (some prints are commented out, they stop the full run) test code: 'get steam_api.dll #inclib "steam_api" declare function GetHSteamPipe cdecl alias $"GetHSteamPipe" a...
by dodicat
May 01, 2019 21:27
Forum: General
Topic: Remove items from array without changing the order
Replies: 7
Views: 299

Re: Remove items from array without changing the order

Sometimes the old looping ways just as good. More like basic than C, and avoiding memory problems. Using fb strings by this method feels safer anyway. #macro arrayinsert(a,index,insert) If index>=Lbound(a) And index<=Ubound(a)+1 Then Var index2=index-Lbound(a) Redim Preserve a(Lbound(a) To Ubound(a)...
by dodicat
May 01, 2019 18:35
Forum: General
Topic: Remove items from array without changing the order
Replies: 7
Views: 299

Re: Remove items from array without changing the order

using memcpy #include "crt.bi" #macro arrayinsert(a,index,b) If index>=Lbound(a) And index<=Ubound(a)+1 Then Redim Preserve a(Lbound(a) To Ubound(a)+1) memcpy(@a(index)+1, @a(index), (Ubound(a)-index) * Sizeof(a(index))) Clear a(index), 0, Sizeof(a(index)) a(index)=b End If #endmacro #macr...
by dodicat
Apr 29, 2019 0:17
Forum: Beginners
Topic: Best Implementation for Set of Elements that I manually change
Replies: 15
Views: 770

Re: Best Implementation for Set of Elements that I manually change

Yes, thanks Mr Swiss, should have been close #n, a typo.
by dodicat
Apr 28, 2019 17:07
Forum: Beginners
Topic: Best Implementation for Set of Elements that I manually change
Replies: 15
Views: 770

Re: Best Implementation for Set of Elements that I manually change

Freebasic doesn't rely on a plethora of libraries (includes e.t.c) as does say, Python or Freepascal. Once you have made your own procedures to do tasks then they can be re-used. Here are some which may suit your task. Freebasic arrays are written in brackets () and are not restricted to zero based....
by dodicat
Apr 27, 2019 11:30
Forum: General
Topic: error w/gen gcc - solved
Replies: 5
Views: 276

Re: error w/gen gcc

gcc version 4.4.7 20120313 (Red Hat 4.4.7-23) (GCC)
by dodicat
Apr 27, 2019 10:11
Forum: General
Topic: error w/gen gcc - solved
Replies: 5
Views: 276

Re: error w/gen gcc

I only have 32 bit fbc in Red Hat Linux.(renamed Scientific Linux)
but
fbc -gen gcc -O 2 -lib -exx rk_spinner.bas
gives no warnings/errors and produces the library file.
by dodicat
Apr 25, 2019 19:51
Forum: Community Discussion
Topic: Are you happy with your office's lightings?
Replies: 20
Views: 901

Re: Are you happy with your office's lightings?

Linuxbob sounds like a person who would not tolerate windows in any shape or form.
Who works in the terminal gloom with a bare flickering light bulb hanging by a yellowish cable, and a moth circling around.
by dodicat
Apr 23, 2019 11:47
Forum: General
Topic: Mandelbrot and Julia Sets fractals without any drawing code?
Replies: 3
Views: 220

Re: Mandelbrot and Julia Sets fractals without any drawing code?

Silent Julia. 'Julia fractals Type complex As Single re,im End Type Operator +(n1 As complex,n2 As complex) As complex Return Type<complex>(n1.re+n2.re,n1.im+n2.im) End Operator Operator *(n1 As complex,n2 As complex) As complex Return Type<complex>(n1.re*n2.re - n1.im*n2.im,n1.im*n2.re + n1.re*n2.i...
by dodicat
Apr 23, 2019 9:22
Forum: General
Topic: Mandelbrot and Julia Sets fractals without any drawing code?
Replies: 3
Views: 220

Re: Mandelbrot and Julia Sets fractals without any drawing code?

Here, the Julia set. 'Julia fractals Type complex As Single re,im End Type Operator +(n1 As complex,n2 As complex) As complex Return Type<complex>(n1.re+n2.re,n1.im+n2.im) End Operator Operator *(n1 As complex,n2 As complex) As complex Return Type<complex>(n1.re*n2.re - n1.im*n2.im,n1.im*n2.re + n1....

Go to advanced search