Re: [fpc-pascal] How to create this "union" ?

2011-12-27 Thread ik
Thank you all for your help Ido On Mon, Dec 26, 2011 at 20:54, dmitry boyarintsev wrote: > Chelper also has hard-timer converting the structure: > It failed on "union nf_inet_addr haddr, hmask;" so I had to comment it > out. Some structures are missing completely. > > type > TAuxType0 = packed

Re: [fpc-pascal] operator in

2011-12-27 Thread Marcos Douglas
On Tue, Dec 27, 2011 at 9:45 AM, Jonas Maebe wrote: > > On 27 Dec 2011, at 13:41, Marcos Douglas wrote: > >> Why operator 'in' has a limit? > > Turn on range checking and you will get a range check error (turning on range > checking when you get strange results should always be the first reflex).

[fpc-pascal] operator in

2011-12-27 Thread Marcos Douglas
Why operator 'in' has a limit? procedure TForm1.Button1Click(Sender: TObject); var t,r1,r2: Integer; begin t := 359; r1 := 252; r2 := 253; if r2 in [r1..t-1] then // 252..359 so, 253 is include ShowMessage('Found') else ShowMessage('Not found'); // <<< not found end; Mar

Re: [fpc-pascal] operator in

2011-12-27 Thread Jonas Maebe
On 27 Dec 2011, at 13:41, Marcos Douglas wrote: > Why operator 'in' has a limit? Turn on range checking and you will get a range check error (turning on range checking when you get strange results should always be the first reflex). Sets are limited to 256 elements because of implementation re

Re: [fpc-pascal] operator in

2011-12-27 Thread Michael Van Canneyt
On Tue, 27 Dec 2011, Marcos Douglas wrote: Why operator 'in' has a limit? It is limited to byte-sized types, i.e, max 256 elements. Michael. procedure TForm1.Button1Click(Sender: TObject); var t,r1,r2: Integer; begin t := 359; r1 := 252; r2 := 253; if r2 in [r1..t-1] then // 252..3