Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2008-12

bitwise generator

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Francisco Reyes
to ik
ik wrote 7 lines
I wish to create a firebird generator that does bitwise  generation rather then ordinal generator. I mean: 1 2 4 8 16 32 64 128 etc.. Does anyone have knowledge how to create such generation in firebird ?

I am not clear what you are trying to do.
You are trying to generate the sequence above, that much I get. However, is it a pascal program which will be a firebird stored procedure?

The algorithm to generate the sequence is trivial so I don't quite follow which part you are having problems with. The generation? The creation of the firebird stored procedure?

If the question is how to generate the sequence in Firebird and not use FPC, then the answer is that you need to have some sort of stored procedure. You could even just have a table with the values.

Reply by email

ik
to Francisco Reyes

Thanks for the answer.

I wanted to do it using Firebird instead of my Pascal code.. now I understand thanks to you, that I need to do it using stored procedure.

Thanks,
Ido

Francisco Reyes wrote 27 lines
ik writes: I wish to create a firebird generator that does bitwise generation rather > then ordinal generator. > > I mean: > 1 2 4 8 16 32 64 128 etc.. > > Does anyone have knowledge how to create such generation in firebird ? > I am not clear what you are trying to do. You are trying to generate the sequence above, that much I get. However, is it a pascal program which will be a firebird stored procedure? The algorithm to generate the sequence is trivial so I don't quite follow which part you are having problems with. The generation? The creation of the firebird stored procedure? If the question is how to generate the sequence in Firebird and not use FPC, then the answer is that you need to have some sort of stored procedure. You could even just have a table with the values. _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Zaher Dirkey
to ik

You can increase the Generator by its value, but be sure the first value of this generator is 1

select gen_id("GenAccID", gen_id("GenAccID", 0)) from rdb$database

ik wrote 43 lines
Thanks for the answer. I wanted to do it using Firebird instead of my Pascal code.. now I understand thanks to you, that I need to do it using stored procedure. Thanks, Ido On Sat, Dec 6, 2008 at 4:38 PM, Francisco Reyes wrote: > > ik writes: > > >> I wish to create a firebird generator that does bitwise generation >> rather then ordinal generator. >> >> I mean: >> 1 2 4 8 16 32 64 128 etc.. >> >> Does anyone have knowledge how to create such generation in firebird ? > > I am not clear what you are trying to do. > You are trying to generate the sequence above, that much I get. > However, is it a pascal program which will be a firebird stored procedure? > > The algorithm to generate the sequence is trivial so I don't quite follow > which part you are having problems with. The generation? The creation of the > firebird stored procedure? > > If the question is how to generate the sequence in Firebird and not use > FPC, then the answer is that you need to have some sort of stored procedure. > You could even just have a table with the values. > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Zaher Dirkey

Reply by email