Search found 2758 matches

by Tourist Trap
May 15, 2019 9:41
Forum: Community Discussion
Topic: When will we have a new challenge :)
Replies: 9
Views: 1617

Re: When will we have a new challenge :)

... the interest of the coding challenge is not only to find the most efficient code or the fastest but also to show the panoply of possibilities. There was this very popular thread authored by fxm that looks like what you describe: https://www.freebasic.net/forum/viewtopic.php?f=17&t=25257&...
by Tourist Trap
May 15, 2019 9:38
Forum: General
Topic: Need help improve my anticheating engine
Replies: 3
Views: 304

Re: Need help improve my anticheating engine

This code is an simple anticheating engine, to defend my values in games from cheaters, based on hashed xor encrypted integers. When an cheat was detectet is the returned value zero(0). It is not perfect so it can be easy cracked with https://www.cheatengine.org/ as example, and this is why i need ...
by Tourist Trap
May 14, 2019 3:01
Forum: Community Discussion
Topic: New array features
Replies: 130
Views: 12194

Re: New array features

Hello, is there a cost in term of performance with the improved handling? Otherwise, in my opinion, we should have a simple unhandled version (fast), and a new handled stuff, handled but slower. If of course there is performance cost. I don't know. Thanks anyway for those proposals. Need time to tes...
by Tourist Trap
May 14, 2019 2:54
Forum: General
Topic: Explicit contructor needed for string in UDT?
Replies: 3
Views: 271

Re: Explicit contructor needed for string in UDT?

Just curious. Why is this not allowed? type font_type dim as string face dim as integer size end type dim as font_type f = type("arial", 18) print f.face, f.size Results in: testString.bas(6) error 98 Hi badidea, From what I think I understood about this, it's because assignment TYPE<...>...
by Tourist Trap
May 13, 2019 19:08
Forum: Documentation
Topic: Wiki improvements
Replies: 350
Views: 35498

Re: Wiki improvements

A next article coming soon (status 'in progress'): 18. How FB supports Sub-Type Polymorphism, demonstrated by Emulation very Close to Real Operating (article of 1 post) See Index page of tutorial / teaching / pedagogical topics (draft articles for documentation) Do you have particular requests arou...
by Tourist Trap
May 13, 2019 3:26
Forum: General
Topic: Typeof (pointer value) ?
Replies: 8
Views: 476

Re: Typeof (pointer value) ?

Now I want to change/replace this part "Cast(udtB ptr," 'from line " get #fx(iB),recN,*Cast(udtB ptr, pA),1 " by used index "iB" with keyword 'Typeof(*somePointer(iB))', assuming, to get needed routine. Hi ppf, if you want an array of untyped pointers , namely somePoin...
by Tourist Trap
May 12, 2019 12:38
Forum: General
Topic: Typeof (pointer value) ?
Replies: 8
Views: 476

Re: Typeof (pointer value) ?

ppf wrote:In case of bigger 'if' statements field to detect datatype, it could be replaced by only one line
of thinked syntax, for any initialized variable type/udt

Why don'tyou you simply pass the size to your read function before you cast the typed variable pointer to an ANY ptr ? Would be simpler.
by Tourist Trap
May 12, 2019 12:34
Forum: General
Topic: Changelog OpenGL 2d render question...
Replies: 1
Views: 201

Re: Changelog OpenGL 2d render question...

2D render through OpenGL on Windows and Linux via screencontrol (angros47) I'm curious as to exactly what this is. Sorry if I missed something obvious... Thanks. Hi, https://www.freebasic.net/forum/viewtopic.php?f=17&t=25902 if you see how this works, don't hesitate to post your discovery. I di...
by Tourist Trap
May 11, 2019 12:18
Forum: General
Topic: Typeof (pointer value) ?
Replies: 8
Views: 476

Re: Typeof (pointer value) ?

what about this one ?? Dim As TypeOf(*p) bar 'p is a pointer to initialized variable/UDT This feature enabled, my life is easier ;) Hello ppf, this below works: dim as single S dim typeOf(*(@S)) X As far as you can say the type just by reading the code, typeOf will also be able to do so. To test ty...
by Tourist Trap
May 10, 2019 8:35
Forum: Community Discussion
Topic: When will we have a new challenge :)
Replies: 9
Views: 1617

Re: When will we have a new challenge :)

Even though I would probably not participate due to lack of time or dedicated skills, I like the idea. Hard to find an original theme. Hi Lost Zerglin, For me any theme would do, it doesn't need to be original. I can see even classical themes being of great interest. For example, a challenge for ma...
by Tourist Trap
May 07, 2019 14:00
Forum: General
Topic: Passing datatype ? (Solved)
Replies: 16
Views: 720

Re: Passing datatype ?

fxm wrote:]Otherwise, the 'BASEOBJECT' base-type with its abstract method is useless.

I guess I wanted to do what you show above :)
But not totally useless to just declare the procedure abstract. If you don't implement it, you get a compilation error:

Code: Select all

error 306: UDT has unimplemented abstract methods
by Tourist Trap
May 07, 2019 13:06
Forum: General
Topic: Passing datatype ? (Solved)
Replies: 16
Views: 720

Re: Passing datatype ?

'type rwRFileUdtB type rwRFileUdtB Extends Object as ushort b as string*3 cs 'etc etc end type Hi ppf, As far as I understand what you want to do here, with the part with GET# that requires the buffer size. I'm thinking of this: type BASEOBJECT extends OBJECT declare abstract function MySize() as i...
by Tourist Trap
May 07, 2019 12:32
Forum: General
Topic: Howto clone UDT variable from its pointer ?? (Partially solved)
Replies: 14
Views: 585

Re: Howto clone UDT variable from its pointer ??

due this https://www.freebasic.net/forum/viewtopic.php?f=3&t=27580 Finding a datatype having solved with help of"Enum" 2 weeks back, in my program, but don't like it. RandomAccesFileread routine has big 'select case' block with 'Get' command for every datatype detected. This is unneed...
by Tourist Trap
May 07, 2019 11:54
Forum: General
Topic: Howto clone UDT variable from its pointer ?? (Partially solved)
Replies: 14
Views: 585

Re: Howto clone UDT variable from its pointer ??

Var Byref B = A '' or Dim Byref B As myUdt = A Print B.a, B.b, B.fs Hi all, @fxm, it's also what I tend to name "clone", but I guess it's something inherited from VB somehow where Classes are byref stuff. Anyway, there is something else that I want to ask, that completes the question. In ...
by Tourist Trap
May 06, 2019 12:48
Forum: Windows
Topic: How to use correct Common Shared syntax?
Replies: 17
Views: 2067

Re: How to use correct Common Shared syntax?

Whatever I try I get the error 4: Duplicated definition. Have tried common ... in both .bas files. Tried with(and without) dim shared ival as long = 10 first in commontest.bas and then test2.bas. Still error 4. Where do I go wrong here? \E Hi, I never used this feature, but one thing is sure to me,...

Go to advanced search