Re: [fpc-devel] Dangerous optimization in CASE..OF

2017-07-02 Thread DaWorm
I store record data in files with a checksum (usually a CRC). I block read them into an array buffer and verify the checksum. If it passes, I assign via typecast the array buffer to a variable of the record type. If I'm the only one reading and writing the files that is usually enough to handle

Re: [fpc-devel] Sets > 256

2015-10-15 Thread DaWorm
On Wed, Oct 14, 2015 at 5:36 AM, Michael Schnell wrote: > (Not hitchhiking the other thread...) > > On 13/10/15 19:59, Mohsen wrote: > >> >> Pascal sets can only contain values/enumerations whose ordinal value is >> <= 255. >> > As currently new language features are

Re: [fpc-devel] BOOL / Comparing booleans - bad style

2014-12-15 Thread DaWorm
Pascal is about readability. A sentence like if this variable is true do that reads better than if this variable do that. The danger is only when the variable type and the constant representing TRUE are not compatible. In C, since TRUE is usually an untyped #define, that can be hard to

Re: [fpc-devel] Multithreading under DOS

2013-09-27 Thread DaWorm
On Sep 27, 2013 3:27 AM, Michael Schnell mschn...@lumino.de wrote: In fact I remember that there even was a multitasking add-on for DOS. Same allowed for switching between multiple DOS desktops without needing a graphical UI. I don't remember the features and the requirements. Perhaps you are

Re: [fpc-devel] Re: [fpc-pascal] Should TObject or TComponent have a Comment property?

2013-07-12 Thread DaWorm
How do you know which object to use if the documentation isn't in a separate, searchable file or website? Just query objects at random until you find what you need? How do you even know what the available objects are? Also, many people still use a lot of procedural code. Where is their

Re: [fpc-devel] where do download BinUtils for ARM - Raspberry Pi?

2013-06-24 Thread DaWorm
On Mon, Jun 24, 2013 at 11:25 AM, Dennis Poon den...@avidsoft.com.hkwrote: ** Does have a stable stock supply? Note this response I saw to a question about the BeagleBoard/BeagleBone: Are we talking the design or the board? We will not guarantee continued supply of any version of the

Re: [fpc-devel] PPU version checking

2013-02-25 Thread DaWorm
Is the project one that can use shared libraries? Or does the code require inheritance from the code you want to hide the implementation of? Jeff. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] Are x86 optimizations across various platforms shared?

2013-02-11 Thread DaWorm
Could it be OS calls are slower on FreeBSD? I don't suppose there's an easy way to profile application versus OS call execution time, is there? Jeff. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] Unicode proceedings

2011-11-18 Thread DaWorm
Perhaps a little extra compiler magic could be used? If the base definition of a string (the hidden stuff before the data) contains not only a field with the encoding, but a flag indicating the disposition of the encoding, then when a string type is aliases, that disposition could be overridden.

Re: [fpc-devel] Unicode proceedings

2011-11-18 Thread DaWorm
On Nov 18, 2011 1:14 PM, Hans-Peter Diettrich drdiettri...@aol.com wrote: That's not easily feasable, as long as empty strings are implemented as Nil pointers. When reference counting etc. should be preserved, the additional information had to be moved into an static string descriptor, together

Re: RE : [fpc-devel] Unicode support (yet again)

2011-09-18 Thread DaWorm
On Sep 18, 2011 5:50 AM, Marco van de Voort mar...@stack.nl wrote: The trouble is that it is not that easy, consider the first thing a long time pascal user will do is fix his existing code which has many constructs that loop over a string: setlength(s2,s1); for i:=1 to length(s1) do

Re: RE : [fpc-devel] Unicode support (yet again)

2011-09-18 Thread DaWorm
On Sun, Sep 18, 2011 at 12:01 PM, Sven Barth pascaldra...@googlemail.com wrote: On 18.09.2011 17:48, DaWorm wrote: But isn't it O(n^2) only when actually using unicode strings? Wouldn't you also be able to do something like String.Encoding := Ansi and then all String[i] accesses would then be o

Re: RE : [fpc-devel] Unicode support (yet again)

2011-09-17 Thread DaWorm
This might be total crap, so bear with me a moment, In an object like a Stringlist, there is a default property such as Strings, such that List.Strings[1] is equivalent to List[1], is there not? If, as in .NET or Java, all strings become objects, then you could have a String object whose default

Re: Adding properties into existing stabs/dwarf; gdb readable workaround ? [[Re: [fpc-devel] Status and ideas about debug info (stabs, dwarf / dwar3)]]

2011-09-13 Thread DaWorm
On Tue, Sep 13, 2011 at 8:52 AM, Graeme Geldenhuys graemeg.li...@gmail.com wrote: [sorry to be harsh towards DaWorm, but that was a damn stupid example] It was only an example intended to show that executing getters can have unintended and sometimes disastrous and/or non reversible side effects

Re: Adding properties into existing stabs/dwarf; gdb readable workaround ? [[Re: [fpc-devel] Status and ideas about debug info (stabs, dwarf / dwar3)]]

2011-09-12 Thread DaWorm
I don't understand why a property with a getter could ever be ran by a debugger. If I have a property called NextValue, implanted by a method called GetNextValue, that increments a field, stores it in a database, and returns the new value, I absolutely do not want the debugger to execute that

Re: [fpc-devel] Arm Thumb2 - Stellaris status

2011-08-20 Thread DaWorm
I'm not sure how FPC should handle the peripherals, but I don't think it should be at the compiler level. Even if the part I'm using has, for instance, an ADC, if I'm not using it I do not want support for it built in to my app. With what I use currently (IAR C) I uncomment a #define for each

Re: [fpc-devel] Arm Thumb2 - Stellaris status

2011-08-19 Thread DaWorm
On Aug 19, 2011 7:13 AM, Geoffrey Barton m...@periphon.net wrote: Afaik there is a standard for the Cortex platform how to do it, google for ARM Cortex Microcontroller Software Interface Standard there is a generic doc on the arm.com site and a stellaris specific one on the TI site.

Re: [fpc-devel] Stellaris Update

2011-08-15 Thread DaWorm
STM32F103 and other ST Micro M3 parts have the ability to remap the vector table. You can create applications to start anywhere in memory, and use a bootloader to remap the table and jump to the new power up vector. In IAR C this is handled in the linker config file. Someone on the list thought

Re: [fpc-devel] Arm Thumb2 - Stellaris status

2011-08-09 Thread DaWorm
For what it's worth, IAR's C compiler for Cortex-M3 uses an ICF file to hold that information, so there is precedent for doing it that way. It holds the following (edited slightly to remove fluff): define symbol __ICFEDIT_intvec_start__ = 0x0800; define symbol __ICFEDIT_region_ROM_start__ =

Re: [fpc-devel] String and UnicodeString and UTF8String

2011-01-12 Thread DaWorm
On Wed, Jan 12, 2011 at 7:38 AM, Hans-Peter Diettrich drdiettri...@aol.com wrote: Until now most users, including you, most probably don't realize that difference between phyiscal and logical characters, and assume that sizeof(char) always is 1 Oh, I'm aware of it. But to date, I haven't had

Re: [fpc-devel] Interface scope incompatibility with Delphi

2010-11-12 Thread DaWorm
Rather than filling up the list with why this particular issue (something I've never done, and don't care about) behaves differently than Delphi, could someone instead focus on how to perform the needed task(s) with FPC? FPC doesn't work the way Delphi does. Take that as a given. Then figure