Search found 2927 matches

by MrSwiss
Jan 28, 2019 20:06
Forum: Beginners
Topic: Ownership?
Replies: 18
Views: 586

Re: Ownership?

cavelamb wrote:Does the EXE installer dink with the registry?
That's not the point.

It tries by default, to install to Program Files (x86), which then causes troubles.
(usually, the ordinary user has not enough rights there)
by MrSwiss
Jan 28, 2019 17:56
Forum: General
Topic: [Freebasic 32 vs 64]
Replies: 32
Views: 717

Re: [Freebasic 32 vs 64]

The test results you are referring to, are without any meaning ...
a) no testing code supplied
b) no testing conditions mentioned (graphics driver used)
(FBC 32 uses DirectX as graphics driver, which isn't available in FBC 64, using GDI, known to be slow)
by MrSwiss
Jan 28, 2019 17:19
Forum: General
Topic: [Freebasic 32 vs 64]
Replies: 32
Views: 717

Re: [Freebasic 32 vs 64]

Coolman wrote:I know all that.
If you write information for others to use, this doesn't matter at all.

Your conclusion is still based of funny assumptions ;-)
(bold print, doesn't change anything)
by MrSwiss
Jan 28, 2019 16:49
Forum: General
Topic: [Freebasic 32 vs 64]
Replies: 32
Views: 717

Re: [Freebasic 32 vs 64]

This is only partly correct (insufficient information): FBC 32 can also output C code (which requires GCC 32 bit installation). Default is: -gen GAS FBC 64 is by default: -gen GCC (can do: code optimisations, which GAS can't). GCC is used to output the assembly code, that is further processed by AS ...
by MrSwiss
Jan 28, 2019 16:20
Forum: Beginners
Topic: Ownership?
Replies: 18
Views: 586

Re: Ownership?

If you are re-installing anyway, then:
    1) download the .zip file (for Windows, NOT the Installer)
    2) create a new folder (e.g. C:\FreeBASIC\), maybe add a version sub-dir, like '1050_32' or '1050_64'
    3) unzip to that Dir ... (should solve any problems)
by MrSwiss
Jan 26, 2019 20:37
Forum: General
Topic: @CODERS "Endian stuff"
Replies: 28
Views: 817

Re: @CODERS "Endian stuff"

albert wrote:What i want to do:
Sorry, won't work ... (unless, you write transcoding routines).

Getting decimal digits from a string, works only with a UByte Ptr.
As explained, in the string[index] example, above ...
(keep in mind, that String is big endian, MSB to LSB)
by MrSwiss
Jan 26, 2019 13:09
Forum: General
Topic: @CODERS "Endian stuff"
Replies: 28
Views: 817

Re: @CODERS "Endian stuff"

... to implement a pointer that can have an endian specified. Because a pointer simply points to the first byte. While above is true, there is something to add to it: as soon, as a pointer is assigned to whatever, it sort of 'inherits' (not in OOP sense!) its endianness from the assigner variable (...
by MrSwiss
Jan 25, 2019 23:17
Forum: General
Topic: @CODERS "Endian stuff"
Replies: 28
Views: 817

Re: @CODERS "Endian stuff"

@albert, a little code snippet illustrating what I've mentioned above: ' StringIndex.bas -- (c) 2019, MrSwiss ' Dim As String s = "12345678901234567890" Dim As ULongInt u = CULngInt(s) ' string to numeric conversion Print "String: "; s Print "ULongInt: "; u : Print For ...
by MrSwiss
Jan 25, 2019 21:46
Forum: General
Topic: @CODERS "Endian stuff"
Replies: 28
Views: 817

Re: @CODERS "Endian stuff"

@albert, First, all numeric data-types are, by default little-endian (Intel/AMD CPU's). The values are BASE 2 (binary), and not BASE 10, which can only be said, if converted to String. Additionally with String, you'll have to 'read' the UBytes from end to start (right to left), thereafter subtract 4...
by MrSwiss
Jan 25, 2019 20:09
Forum: General
Topic: @CODERS "Endian stuff"
Replies: 28
Views: 817

Re: @CODERS "Endian stuff"

@albert, How do you get the Mid() value of *uinteger ptr and *ulongint ptr , and convert the mid() back to big endian??? Mid() is a String Function, therefore I don't understand, what you want to do. Just picking a Ubyte or UShort, from a larger 'integer type' , makes no sense to me. Btw: your UInte...
by MrSwiss
Jan 24, 2019 2:32
Forum: General
Topic: @CODERS "Endian stuff"
Replies: 28
Views: 817

Re: @CODERS "Endian stuff"

@albert,
albert wrote:Now how do you convert the byte swapped value (little endian) back to big endian ????
Well, the same way:
Swap CPtr(UByte Ptr, @UShort)[0], CPtr(UByte Ptr, @UShort)[1]
@UShort = address of a UShort variable (UShort Ptr)
by MrSwiss
Jan 24, 2019 1:38
Forum: General
Topic: @CODERS "Endian stuff"
Replies: 28
Views: 817

Re: @CODERS "Endian stuff"

So now i can get: The actual "00" to "99" value of the ushort ptr.. The the byte swapped value of the ushort ptr.. I don't really understand because, value of a UShort = 0 To 65535 ... ??? (dereferenced UShort Ptr, is the same) value of a UByte = 0 To 255 ... ??? (dereferenced U...
by MrSwiss
Jan 23, 2019 23:24
Forum: General
Topic: @CODERS "Endian stuff"
Replies: 28
Views: 817

Re: @CODERS "Endian stuff"

I was talking about forcing a ptr to return a certain endian A ptr has always the same "endianness", as the machine's CPU. Maybe you'll understand it better in code (than in words). Two overloaded endian switchers (32bit / 64bit integers): ' (c) 2019-01-24, MrSwiss Function sw_endian Over...
by MrSwiss
Jan 18, 2019 15:06
Forum: General
Topic: 2d quasi cristals
Replies: 3
Views: 177

Re: 2d quasi cristals

At a quick first glance, I'd change the following two Functions: function length( x as double , y as double ) as double return sqr( x * x + y * y ) ' <-- for speed (simpler math.) end Function function irange( low as integer , high as integer ) as integer return int( rnd() * ( (high + 1) - low ) + l...
by MrSwiss
Jan 17, 2019 15:28
Forum: Beginners
Topic: DIR does list (some) files as directories
Replies: 14
Views: 394

Re: DIR does list (some) files as directories

padawan wrote:Same command but different problem.

Well, I consider that remark, as rather short-sighted.
(It could very well solve your next problem ...)

Go to advanced search