[fpc-pascal] runtime error 13, internet, fpconnect

2009-05-07 Thread Rainer Stratmann
What does runtime error 13 mean?
If I wat to connect from Linux with fpconnect I get always a connection 
regardless of the IP adress.
Rainer
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] A complex trouble(at least for me)

2009-05-07 Thread Arí Ricardo Ody

Suppose the following structure:

01 a-1.
   03 b-1 pic xxx.
   03 b-2 pic 999.
   03 b-3.
  05 c-1 pic aaa.
  05 c-2.
 07 d-1 pic zzz.
 07 d-2 pic xxx.
  05 c-3 pic 99.
   03 b-4 pic zzz.
   03 b-5.
  05 e-1 pic zzz.

All line not containing the word pic I would call a group item and 
the other lines will be elementary items.


I would like to wrote a routine(or program) that save each group item 
and the elementary items contained in a StringList. Admit that the 
pattern of the structure is random. The example above is only an example.


In this example:
StringList1 will contain 'a-1' '03 b-1 pic xxx.' '03 b-2 pic 999.' 
'03 b-4 pic zzz.'

StringList2 will contain 'b-3' '05 c-1 pic aaa.' '05 c-3 pic 99.'
StringList3 will contain 'c-2' '07 d-1 pic zzz.' '07 d-2 pic xxx.'
StringList4 will contain 'b-5' '05 e-1 pic zzz.'

At the end of the program I will(for example) write the StringList's 
to disk. But I can't write anyone before the program end.


I had thinked hard about it. I can't create StringList with a 
variable name. I must previously  declare each one in my pascal 
source. How can I solve the trouble proposed?


Note that when I'm appending strings in a StringList, it's possible 
that I must create a new StringList(or various), put data in it(or 
them) and return to put data in the first StringList.


If the solution is obvious I beg your pardon. I can't find it.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] TFPColor vs TColor

2009-05-07 Thread David Emerson
Incidentally, while working with the TfpgColor type, I've come up with a 
rather sloppy, but (for the time being) usable solution. I keep 
a fixme comment in the code, because it may very well blow up in my 
face sometime.

type
  TfpgIntColor = TfpgColor;
  TfpgRecordColor = record
blue, green, red, alpha : byte;  // order is important
end;

operator := (c_in : TfpgRecordColor) : TfpgIntColor;
  var
p : pointer;
  begin
p := @c_in;
result := TfpgIntColor (p^);
  end;

operator := (c_in : TfpgIntColor) : TfpgRecordColor 
  var
p : pointer;
  begin
p := @c_in;
result := TfpgRecordColor (p^);
  end;


~David.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] A complex trouble(at least for me)

2009-05-07 Thread David W Noon
On Thu, 2009-05-07 at 18:12 -0300, Arí Ricardo Ody wrote:

 Suppose the following structure:
 
 01 a-1.
03 b-1 pic xxx.
03 b-2 pic 999.
03 b-3.
   05 c-1 pic aaa.
   05 c-2.
  07 d-1 pic zzz.
  07 d-2 pic xxx.
   05 c-3 pic 99.
03 b-4 pic zzz.
03 b-5.
   05 e-1 pic zzz.
 
 All line not containing the word pic I would call a group item and the
 other lines will be elementary items.

This is loosely COBOL source code.
 
 I would like to wrote a routine(or program) that save each group item
 and the elementary items contained in a StringList. Admit that the
 pattern of the structure is random. The example above is only an
 example.
 
 In this example:
 StringList1 will contain 'a-1' '03 b-1 pic xxx.' '03 b-2 pic 999.' '03
 b-4 pic zzz.'
 StringList2 will contain 'b-3' '05 c-1 pic aaa.' '05 c-3 pic 99.'
 StringList3 will contain 'c-2' '07 d-1 pic zzz.' '07 d-2 pic xxx.'
 StringList4 will contain 'b-5' '05 e-1 pic zzz.'

Do you want to put the COBOL source into a TStringList?
 
Are you trying to write a COBOL compiler?

If not, what are you trying to do?

-- 
Regards,

Dave  [RLU #314465]
===
david.w.n...@ntlworld.com (David W Noon)
===
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


RE: [fpc-pascal] A complex trouble(at least for me)

2009-05-07 Thread Cox, Stuart TRAN:EX
There's some interesting ideas on how to store hierarchical data in tabular 
form available by googling how can I represent hierarchal data in a relational 
database?  

You might be able to linearize your hierarchical structure's data by using the 
techniques found there.

Stu Cox
Project Management Technician
Southern Interior Region
Ministry of Transportation and Infrastructure
342-447 Columbia St.,
Kamloops, BC V2C 2T3
p: 250-828-4320
f: 250-828-4229
stuart@gov.bc.ca

-Original Message-
From: fpc-pascal-boun...@lists.freepascal.org 
[mailto:fpc-pascal-boun...@lists.freepascal.org] On Behalf Of David W Noon
Sent: Thursday, May 7, 2009 3:40 PM
To: FPC-Pascal users discussions
Subject: Re: [fpc-pascal] A complex trouble(at least for me)

On Thu, 2009-05-07 at 18:12 -0300, Arí Ricardo Ody wrote:

 Suppose the following structure:
 
 01 a-1.
03 b-1 pic xxx.
03 b-2 pic 999.
03 b-3.
   05 c-1 pic aaa.
   05 c-2.
  07 d-1 pic zzz.
  07 d-2 pic xxx.
   05 c-3 pic 99.
03 b-4 pic zzz.
03 b-5.
   05 e-1 pic zzz.
 
 All line not containing the word pic I would call a group item and the 
 other lines will be elementary items.

This is loosely COBOL source code.
 
 I would like to wrote a routine(or program) that save each group item 
 and the elementary items contained in a StringList. Admit that the 
 pattern of the structure is random. The example above is only an 
 example.
 
 In this example:
 StringList1 will contain 'a-1' '03 b-1 pic xxx.' '03 b-2 pic 999.' '03
 b-4 pic zzz.'
 StringList2 will contain 'b-3' '05 c-1 pic aaa.' '05 c-3 pic 99.'
 StringList3 will contain 'c-2' '07 d-1 pic zzz.' '07 d-2 pic xxx.'
 StringList4 will contain 'b-5' '05 e-1 pic zzz.'

Do you want to put the COBOL source into a TStringList?
 
Are you trying to write a COBOL compiler?

If not, what are you trying to do?

--
Regards,

Dave  [RLU #314465]
===
david.w.n...@ntlworld.com (David W Noon) 
===
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org 
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] A complex trouble(at least for me)

2009-05-07 Thread Doug Chamberlin

Arí Ricardo Ody wrote:

[snipped]
I can't create StringList with a variable 
name. I must previously  declare each one in my pascal source. How can I 
solve the trouble proposed?


I don't understand this part of your message. Does this mean you think 
you cannot dynamically create TStringList instances in your code?


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal