Search found 2495 matches

by MrSwiss
Jun 22, 2018 9:04
Forum: Tips and Tricks
Topic: a sensor control - demo
Replies: 4
Views: 128

Re: a sensor control - demo

ByRef returns from Functions, are "faster" than ByVal ... (no copy op. needed)

Note: it is important to use "Const" qualifier, to "close a open back-door",
which would allow, modification of the "type internal variable"!
by MrSwiss
Jun 22, 2018 8:28
Forum: Tips and Tricks
Topic: a sensor control - demo
Replies: 4
Views: 128

Re: a sensor control - demo

Just seen the Byref discussion at: WIKI improvements
Above example/demo code uses ByRef returns, which may be a starter ...
by MrSwiss
Jun 21, 2018 21:47
Forum: Tips and Tricks
Topic: a sensor control - demo
Replies: 4
Views: 128

a sensor control - demo

Hi all, this demo shows a type, to handle sensor data & status ... It shows a supposed Water-Heater operating on data which is: 1) user supplied (a const in the demo), setting target temperature etc. 2) a generated random value (here, supposed sensor reading) 3) generated delay times (for furthe...
by MrSwiss
Jun 21, 2018 13:28
Forum: Beginners
Topic: Printing
Replies: 6
Views: 156

Re: Printing

It makes no difference, whether you are using a file, or output directly to printer. A probable solution would be, a procedure that *inserts* printer command codes (aka: escape sequences), into the data-stream ... Consult your printer's manual ... In short: a sort of *Printer-Driver*, depending on u...
by MrSwiss
Jun 19, 2018 11:45
Forum: General
Topic: Machine Learning
Replies: 34
Views: 763

Re: Machine Learning

[off topic] The great unwashed should never have been given the opportunity to vote. This is where democracy fails. NO, never, this is exactly, what democracy is all about! aka: You've clearly got it: *the wrong way around*. Btw: I can't stand that elitist hogwash , you are advertising/proposing! @d...
by MrSwiss
Jun 16, 2018 10:42
Forum: Beginners
Topic: Hello looking for some tutorials
Replies: 2
Views: 112

Re: Hello looking for some tutorials

Tutorials are in the official FreeBASIC documentation too, however,
they may not be up to date: FB-Documentation (see Community Tutorials)
Some thoughts and ideas concerning: beginners & Libraries
by MrSwiss
Jun 16, 2018 0:26
Forum: Documentation
Topic: FB palette array datatypes
Replies: 15
Views: 332

Re: FB palette array datatypes

I also think you arbitrarily assign the cause, ... Could you please, be a bit more specific, on that "arbitrarily" statement? I think that I've explained later on sufficiently, what is meant in the first statement. To be honest, not really looking for opinions, just to let users know it's...
by MrSwiss
Jun 15, 2018 19:20
Forum: Community Discussion
Topic: Speed of FreeBasic
Replies: 54
Views: 2305

Re: Speed of FreeBasic

deltarho[1859] wrote:The phrase is actually 'Apples vs oranges'.
While this may be correct in english, in german, we like to be, from afar different: it's as written ;-)
(since both of them, are still fruits, right?)
by MrSwiss
Jun 15, 2018 16:41
Forum: Game Dev
Topic: What is good cross platform gameloop?
Replies: 39
Views: 1504

Re: What is good cross platform gameloop?

I don't quite understand why the return is Long, but: Dim As ULong mode, cnt = 1 Dim As UShort w, h, cd = 32 ' cd = color depth (in bit's) ' macros: v (value) is converted to ULong (32 bit) then filtered (to 16 bit) ' since 'built in' macros cast to UInteger, they're considered "unsafe" in...
by MrSwiss
Jun 15, 2018 15:48
Forum: Community Discussion
Topic: Speed of FreeBasic
Replies: 54
Views: 2305

Re: Speed of FreeBasic

Just for fun (with code by: zxretrosoft): Loop Until, sped up by using AndAlso (instead of, And) loop until (h1=ps1 AndAlso h2=ps2) AndAlso (h3=ps3 AndAlso h=x) + used fbc64 ver. 1.05.0: -s console -gen gcc -O 3 -fpu sse runtime = approx.: 4.11 Seconds !!! <-- if you want to do: speed comparisons, p...
by MrSwiss
Jun 15, 2018 12:03
Forum: Documentation
Topic: FB palette array datatypes
Replies: 15
Views: 332

Re: FB palette array datatypes

Perhaps, but currently, ULong pallette arrays do not work with FBC-64. This is due to: legacy language mode = QB! The Ball & Chain, on FB's legs ... Even if QB afaik, had type Long = 32 bit int type (Integer, in QB = Short in FB). This is the reason, that GFXLib2 requires "Integer" as...
by MrSwiss
Jun 15, 2018 11:25
Forum: Documentation
Topic: FB palette array datatypes
Replies: 15
Views: 332

Re: FB palette array datatypes

... the declared type of palette array should always be an U/Integer (32-bit or 64-bit, depending on the platform) This is clearly (from a memory allocation point of view), the wrong approach, since any 32 bit's color should only ever be represented by ULong! (fixed unsigned 32 bit type, uint in &q...
by MrSwiss
Jun 13, 2018 12:37
Forum: Game Dev
Topic: What is good cross platform gameloop?
Replies: 39
Views: 1504

Re: What is good cross platform gameloop?

@coderJeff, H & W are DWORD on windows and __u32 on linux (i.e. ULONG SHORT ) at the API Aka: H = WORD, L = WORD (USHORT) ... by M$'s definition of data-types, as well as __u32 seems to be ... (I'm not 'a jour' on LIN-vars.). the Field=1 statement in -lang FB has only an effect if: 1) the defaul...
by MrSwiss
Jun 13, 2018 1:51
Forum: Documentation
Topic: Wiki improvements
Replies: 166
Views: 5299

Re: Wiki improvements

Btw: it is the very same, with: "Protected:" access ...
by MrSwiss
Jun 12, 2018 21:45
Forum: Beginners
Topic: Byval myType PTR vs. myType as function parameter?
Replies: 15
Views: 455

Re: Byval myType PTR vs. myType as function parameter?

sancho3 wrote:SUB somesub2(/'this parameter defaults To byref '/ zzz as type__t)

Sorry, this is incorrect, because "not stated passing method" defaults to: ByVal, except in
cases, where default ByRef is implicit (Array's passing, where "specifiers" are forbidden).

Go to advanced search