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 PM, silvioprog wrote: >

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 really bad thing is the name, as Floria

Re: [fpc-pascal] HMAC_SHA1 and FPC

2013-03-24 Thread David Butler
congrats on re-inventing the wheel. all those string allocations/de-allocations could make it slow. On Sun, Mar 24, 2013 at 6:12 AM, silvioprog wrote: > Eureka! > > After spending all day working on it, I finally did it! The pseudo steps > are here: > http://en.wikipedia.org/wiki/Hash-based_mess

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 wrote: > 2013/3/23 David Butler > >

Re: [fpc-pascal] HMAC_SHA1 and FPC

2013-03-23 Thread David Butler
Hi You can find a hash library that supports HMAC-SHA1 here: http://fundementals.sourceforge.net/dl.html On Sat, Mar 23, 2013 at 7:28 AM, silvioprog wrote: > Hello, > > How to get HMAC_SHA1 using native functions of FPC? > > HMAC_SHA1: > http://en.wikipedia.org/wiki/Hash-based_message_authent

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 wrote: > > RemObjects' PascalScript for me. Definitely what I want. Small, bytecode > compiled, cross-platform (to some limits

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/ On 10 December 2010 21:18, Andrew Brunner wrote: > Hi there, > > I'm considering p

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 : > 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 NOTICE: This e-mail is conf

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

[fpc-pascal] Linking pthread?

2005-08-20 Thread David Butler
Hi When I compile an application that uses libc under Linux I get: "/usr/bin/ld: cannot find -lpthread" From what I gather pthread is a standard library. How do I get the linker to find it? Thanks. David ___ fpc-pascal maillist - fpc-pascal@lists