Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-01 Thread David Butler
On Mon, Feb 1, 2016 at 8:45 PM, Dmitry Boyarintsev < skalogryz.li...@gmail.com> wrote: > > > On Mon, Feb 1, 2016 at 1:40 PM, silvioprog wrote: > >> On Mon, Feb 1, 2016 at 3:34 PM, Dmitry Boyarintsev < >> skalogryz.li...@gmail.com> wrote: >> >>> On Mon, Feb 1, 2016 at 1:23

Re: [fpc-pascal] New feature: IfThen() intrinsic

2016-02-01 Thread David Butler
This is usually called "inline if". Maybe call it "inlineif" or "iif", e..g x := iif (a < 3, 1, 2) or even x := iif a < 3 then 1 else 2; On Mon, Feb 1, 2016 at 10:26 AM, Maciej Izak wrote: > 2016-02-01 8:59 GMT+01:00 Marco van de Voort : > >> The only

Re: [fpc-pascal] HMAC_SHA1 and FPC

2013-03-23 Thread David Butler
What do you mean by native? It is pure pascal code that compiles under Delphi and FreePascal. Using it is as easy as: SHA1DigestToHexA(CalcHMAC_SHA1('secret', 'message') On Sat, Mar 23, 2013 at 5:18 PM, silvioprog silviop...@gmail.com wrote: 2013/3/23 David Butler djbut...@gmail.com Hi

Re: [fpc-pascal] Reversing bit-order of byte

2012-05-03 Thread David Butler
If you want to go assembly: function ReverseBits(const Value: LongWord): LongWord; register; assembler; asm BSWAP EAX MOV EDX, EAX AND EAX, 0h SHR EAX, 1 AND EDX, 0h SHL EDX, 1 OR EAX, EDX MOV EDX, EAX

Re: [fpc-pascal] Re: Pascal Scripting Engines

2010-12-13 Thread David Butler
Blaise also offers strongly and statically typed variables. In fact, Blaise allows both statically and dynamically types variables. On 13 December 2010 18:16, leledumbo leledumbo_c...@yahoo.co.id wrote: RemObjects' PascalScript for me. Definitely what I want. Small, bytecode compiled,

Re: [fpc-pascal] Pascal Scripting Engines

2010-12-10 Thread David Butler
A while back I wrote a scripting language based on Pascal that features byte code generation. I haven't worked on it in many years though. http://www.eternallines.com/blaise/ http://www.eternallines.com/blaise/ On 10 December 2010 21:18, Andrew Brunner andrew.t.brun...@gmail.comwrote: Hi

Re: [fpc-pascal] sysutils.beep doesn't beep under Linux?

2009-11-18 Thread David Butler
Try writing Ctrl-G (#7) out to the terminal. 2009/11/18 Bruce Bauman bruce.bau...@andesaservices.com: I'm porting some code which beeps the console. When I use sysutils.beep() it doesn't work under Linux. What's the easiest way to accomplish this? Thanks. -- Bruce CONFIDENTIALITY

Re: [fpc-pascal] Linking pthread?

2005-08-21 Thread David Butler
Hi Anton Thanks for the pointers! libpthread was installed under /lib, but for some reason I had to copy libpthread.so.0 to libpthread.so to get ld to see it. Regards David On Sat, 20 Aug 2005 22:21:53 +0200, you wrote: Hi, David Butler wrote: Hi When I compile an application that uses libc