Search found 2752 matches

by Tourist Trap
May 12, 2019 12:38
Forum: General
Topic: Typeof (pointer value) ?
Replies: 8
Views: 349

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: 128

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: 349

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: 722

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: 498

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: 498

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: 410

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: 410

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: 572

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,...
by Tourist Trap
May 06, 2019 12:36
Forum: Community Discussion
Topic: "A Love Letter To FreeBASIC" Game Dev Competition (Feb 2019 –Mar 2019) - Round 2
Replies: 99
Views: 5372

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Feb 2019 –Mar 2019) - Round 2

dafhi wrote:@Tourist Trap .. DPI: error loading shcore.dll

Yes I know. You probably have a version of windows older than 10. Anyway, not your fault, you can just uncomment this line:

Code: Select all

#include once "inc/landeelDpiAwarerenessSetter.bas"

It should be ok then! :)
by Tourist Trap
May 05, 2019 16:46
Forum: Documentation
Topic: SWAP keyword
Replies: 35
Views: 895

Re: SWAP keyword

And for UDTs, the contents of the structures are swapped without any operators or methods being called. This information is important. It means then that we won't be able to swap 2 variables even if they are compatible with their UDTs having proper LET and CAST operators defined. If I understand we...
by Tourist Trap
May 05, 2019 11:57
Forum: Community Discussion
Topic: "A Love Letter To FreeBASIC" Game Dev Competition (Feb 2019 –Mar 2019) - Round 2
Replies: 99
Views: 5372

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Feb 2019 –Mar 2019) - Round 2

fxm wrote:
Tourist Trap wrote:Ok, so you met FXM. Yes it's a very young man :)

A very young man of 68 years

Yes but with vivid brain of a youngster :)
by Tourist Trap
May 05, 2019 10:04
Forum: Documentation
Topic: SWAP keyword
Replies: 35
Views: 895

Re: SWAP keyword

fxm wrote:KeyPgSwap → fxm [Reworded Note]

Thanks a lot. This little note now helps understanding the logic behind.
by Tourist Trap
May 05, 2019 9:58
Forum: Community Discussion
Topic: "A Love Letter To FreeBASIC" Game Dev Competition (Feb 2019 –Mar 2019) - Round 2
Replies: 99
Views: 5372

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Feb 2019 –Mar 2019) - Round 2

I tried you game on windows (also works on linux via wine), but I don't know what I am supposed to do. I get click on this rotating dna-strand and then I can navigate in this square area but then I don't know. At least I know now how (lots of ow :-) FXM looks like. Hello badidea, happy to hear you ...
by Tourist Trap
May 04, 2019 18:37
Forum: Documentation
Topic: SWAP keyword
Replies: 35
Views: 895

Re: SWAP keyword

Encapsulate an Integer in a UDT does not improve the efficiency of 'Swap'. Yes I think that now I see why. If I'm on the right path with my previous intuition. Here, the *header* is of the same weight as the *data*, so no win. There is a mystery then, why is there a slight advantage still obvservab...

Go to advanced search