Search found 3003 matches

by MrSwiss
May 04, 2019 14:46
Forum: Documentation
Topic: SWAP keyword
Replies: 35
Views: 664

Re: SWAP keyword

I think that misunderstanding on this subject is definitive between us. OK, i'll try, one more time: the left / right columns of results proof nothing, because: the comparison should be: String vs. Type (identical to String) both with Swap , which I expect to result in: equality (more or less) you'...
by MrSwiss
May 04, 2019 14:18
Forum: Documentation
Topic: SWAP keyword
Replies: 35
Views: 664

Re: SWAP keyword

swap time proxy time str: 0.006706200074404478 0.05453830002807081 So you see no improvement between the left column and the right column? Absolutely pointless question because: compare: apples with apples to do that, the current testing code is useless. What does useless test code proof? (rhetoric...
by MrSwiss
May 04, 2019 13:23
Forum: Documentation
Topic: SWAP keyword
Replies: 35
Views: 664

Re: SWAP keyword

The difference is that a string is an object with a Let operator Let that copies the string data characters when assignment is called, which is not the case of an UDT containing a pointer to data block. Sorry, but this is nonsense because, the DATA isn't touched at all, just the Ptr's adresses need...
by MrSwiss
May 04, 2019 13:04
Forum: Documentation
Topic: SWAP keyword
Replies: 35
Views: 664

Re: SWAP keyword

Sorry, doesn't make the tiniest bit of sense, by cons, it's just illogical, at least as long, as you can't describe the very details of optimizing, that is "supposedly" taking place ... A Ptr in a UDT "u" and, a Ptr in the UDT "String", is "the same difference"...
by MrSwiss
May 04, 2019 11:20
Forum: Documentation
Topic: SWAP keyword
Replies: 35
Views: 664

Re: SWAP keyword

KeyPgSwap → fxm [Added a note that what Swap is optimized for var-len strings] This is not exactly the whole truth, because it applies likewise, to PTR's in UDT's (any data-type or UDT), where the allocated memory is always external to the UDT itself (only the PTR's size is allocated, inside the UD...
by MrSwiss
May 04, 2019 8:54
Forum: Documentation
Topic: SWAP keyword
Replies: 35
Views: 664

Re: SWAP keyword

C:\DEV_TOOLS\FreeBASIC\1060_64\fbc -s console "xyz.bas" (no optimisations) Intel i7 7th gen. (U model), dual core (4 virtual), WIN10 pro 64 swap time proxy time int: 0.002437999937683344 0.002927400171756744 str: 0.006706200074404478 0.05453830002807081 udt: 0.01079980004578829 0.048528299...
by MrSwiss
May 04, 2019 3:02
Forum: General
Topic: constant pointer to global struct member
Replies: 8
Views: 317

Re: constant pointer to global struct member

If the aim is, to have only the ptr constant: type MyStruct as integer A = 3456 end type static shared as MyStruct tA Dim Shared As MyStruct Const Ptr ptA = @tA Print ptA->A ' outputs: 3456 ptA->A = 8912 ' new assignment Print ptA->A ' outputs: 8912 Sleep The direct ptr to a member of a type, is not...
by MrSwiss
May 04, 2019 2:27
Forum: General
Topic: constant pointer to global struct member
Replies: 8
Views: 317

Re: constant pointer to global struct member

it works with @tA but it does not work with @tA.A Ptr access to member is -> (and not . ) therefore: asm mov (r)(e)ax, [ptA] ' load ptr mov (r)(e)ax, [(r)(e)ax] ' load address (to type) ... ' get offset to member ... ' add offset to base address ... ' load value end asm I don't know why you want to...
by MrSwiss
May 04, 2019 0:46
Forum: General
Topic: constant pointer to global struct member
Replies: 8
Views: 317

Re: constant pointer to global struct member

which gives another issue... that variables inside structs are not accessible from ASM in the conventional ways... should those be notified as bugs... or feature requests? The Const (even if used as qualifier only) is responsible, that the members can't be changed, however, this is "expected b...
by MrSwiss
May 03, 2019 17:01
Forum: Community Discussion
Topic: Please help me translate this Python code fragment to implement Steam Achievements
Replies: 21
Views: 662

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

Seems to me that you concentrate on the wrong issue, the name of a procedure, rather than the FUNCTIONALTY, it provides ... I'm petty certain that, the functonality has either been removed (irrevocable) or, is implemented under a new (different) name. If doing something new, one should aim to be cur...
by MrSwiss
May 03, 2019 14:10
Forum: Community Discussion
Topic: Please help me translate this Python code fragment to implement Steam Achievements
Replies: 21
Views: 662

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

cannot find -lsteam_api Hey dodicat, how do you compile that? Don't you need a "steam_api.a"? No, because dodicat clearly states: DLL (.a whould be a static lib) while DLL referres to: dynamically linked lib. What you may need is: libname.dll.a (a DLL import lib, only for compilation need...
by MrSwiss
May 02, 2019 22:33
Forum: Community Discussion
Topic: How to do -g but without assertions?
Replies: 15
Views: 1744

Re: How to do -g but without assertions?

Anyways, an option to disable the -s during linking sounds useful for that. It should probably remain the default for non-debug builds though. Which seems to be different, from what 'vilhelmgray' has implemented currently (inverted logic -Strip). I'd therefore, prefer your approach: -NoStrip, defau...
by MrSwiss
May 02, 2019 21:43
Forum: Projects
Topic: gentext chung text generation based on SORT algorythm
Replies: 12
Views: 620

Re: gentext chung text generation based on SORT algorythm

Well, for PGC, there is:
pcg32rr.bi - minimal PCG32_random_r implementation ( (c) Melissa E. O'Neill )
from myself ... to start off, with (a header only, implementation).
by MrSwiss
May 01, 2019 12:35
Forum: Beginners
Topic: Best Implementation for Set of Elements that I manually change
Replies: 15
Views: 803

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

While indexing (1 based) might be simpler to deal with, from a human perspective, it is important to remember, that by default: all indexing operations are: BASE 0 in FB, as is Standard in other languages, e.g. in C. Therefore, my advice would be, to get used to BASE 0, which avoids later confusion ...
by MrSwiss
Apr 29, 2019 22:29
Forum: Beginners
Topic: Best Implementation for Set of Elements that I manually change
Replies: 15
Views: 803

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

But still a thousand times faster (if not a million) then the time it takes a human to enter a new name :-) I agree. @TT, You like it far to much, to go a bit off-topic , just to add your 2 cents. Just don't do it, again! (there is no need to redim anything, if you'd have read the initial post, car...

Go to advanced search