[Lazarus] Unpack of PHP

silvioprog silvioprog at gmail.com
Mon Feb 4 15:34:47 CET 2013


2013/2/4 ik <idokan at gmail.com>

> On Mon, Feb 4, 2013 at 1:34 PM, silvioprog <silvioprog at gmail.com> wrote:
> > Hello,
> >
> > In FPC, I'm trying to load a ASCII content and onvert it to integer, but,
> > without success. In PHP I do it easily.
> >
> > I send two files in attached:
> >
> > 1. php - demo in PHP working fine (the demo uses unpack function:
> > http://www.php.net/manual/en/function.unpack.php);
> > 2. fpc - demo in FPC partially implemented;
> >
> > So, how to do it in FPC?
>
> Take a look at my fp-msgpack[1] (I need to rewrite it, because the way
> that array and maps works), but it does exactly what pack and upack
> does.
>
> >
> > Thank you!
> >
> > ps. I tried the Unpack function of FPC, but I don't know how to use it.
> >
> > --
> > Silvio Clécio
> > My public projects - github.com/silvioprog
>
> [1] https://github.com/ik5/fp-msgpack
>

I have not found the line that does the conversion (from ASCII to integer).
The your code is big. I will need to study it to understand it.
In PHP was so easy (only two lines), that I would have swore that something
native and easy to use with Free Pascal.

Thank you!

-- 
Silvio Clécio
My public projects - github.com/silvioprog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20130204/77de88da/attachment-0003.html>


More information about the Lazarus mailing list