Search found 3037 matches

by MrSwiss
May 05, 2019 16:20
Forum: Beginners
Topic: Automatic conversion WSTRING to (Z)STRING
Replies: 10
Views: 383

Re: Automatic conversion WSTRING to (Z)STRING

Result: H€llΩ 8 H€llΩ 5 As seen above len(String) contains 8 (UByte) while len(WString) contains 5 (UShort?), which indicates, that *..IX* systems use UTF-8 (as standard) which is a very different system, looking at it from a DOS/WIN perspective (ASCII/ANSI) ... (Btw. not certain, that WString on *...
by MrSwiss
May 04, 2019 19:29
Forum: Documentation
Topic: SWAP keyword
Replies: 35
Views: 871

Re: SWAP keyword

Thumbs up, full marks, thanks ... just use *generally" as first word (after NOTE:)
by simply deleting "more"
by MrSwiss
May 04, 2019 19:20
Forum: Documentation
Topic: SWAP keyword
Replies: 35
Views: 871

Re: SWAP keyword

Perhaps: Note: For var-len strings, Swap is more efficient than a classical exchange by circular assignments (using a third temporary string), because only the strings descriptors are exchanged rather than all strings data characters. More generally, when the data are referenced by a pointer, alone...
by MrSwiss
May 04, 2019 17:07
Forum: Documentation
Topic: SWAP keyword
Replies: 35
Views: 871

Re: SWAP keyword

Your Poposal: -> OK, for String I'd like you, however, to add something like: The same applies to Ptr's, even in UDT's (Ptr's swapped, no change to 'pointed to' values). <OT> just had a server failure (trying to post): 503 Service Unavailable The server is temporarily busy, try again later! </OT>
by MrSwiss
May 04, 2019 14:46
Forum: Documentation
Topic: SWAP keyword
Replies: 35
Views: 871

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

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

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

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

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

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

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

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

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

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

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...

Go to advanced search