[Gambas-user] Q:how to save a file.png into Postgresql
Rolf Schmidt
rolf.frogs at ...221...
Tue Sep 2 13:48:55 CEST 2008
Hello Richard
> Dies at the line containing 'Coct' with message: unknown identifier
>
> but I'm sure this way is good, as I can remember reading something about
> this in the postgres doc's but couldn't figure out how to do the
> substitution.
OK, I thougt it is a Gambas converting function, but it isn't.
It should convert a given number into an octal number, return the number as a
string.
So here it is:
PRIVAT FUNCTION COct(num as Integer) as String
DIM octnumber AS NEW Interger[]
DIM octstring as String
octnumber.Add(int(num / 64))
octnumber.Add(int((num MOD 64) / 8 ))
octnumber.Add((num Mod 64) MOD 8)
octstring = octnumber[0] & octnumber[1] & octnumber[2]
RETURN octstring
END
> Next step?
Test it.
Fine regards
Rolf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20080902/92b3a2c4/attachment.sig>
More information about the User
mailing list