Sign in Join

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

Mailing lists / fpc-pascal / 2004-03

constant longword problem

5 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Marc Santhoff

Hi!

Using fpc 1.0.10 on FreeBSD ig do this:

USB_DO_REQUEST : longword = 3222820207;

and the compiler says:

usb_h.pp(43,39) Error: Illegal expression

Why thar? The maximum value of longword is bigger, and if i declare it to be longint it compiles. But this constant is to be used for an ioctl() and I'm afraid, the signed value will not work.

USB_DO_REQUEST : longint =  -1072147089;

Compiling usb_h.pp
Assembling usb_h
45 Lines compiled, 0.0 sec

Bye,
Marc

Peter Vreman
to Marc Santhoff
you wrote 19 lines
Hi! Using fpc 1.0.10 on FreeBSD ig do this: USB_DO_REQUEST : longword = 3222820207; and the compiler says: usb_h.pp(43,39) Error: Illegal expression Why thar? The maximum value of longword is bigger, and if i declare it to be longint it compiles. But this constant is to be used for an ioctl() and I'm afraid, the signed value will not work. USB_DO_REQUEST : longint = -1072147089; Compiling usb_h.pp Assembling usb_h 45 Lines compiled, 0.0 sec

Constants > maxlongint are not supported in 1.0.x. You need to use 1.9.x

Peter

Marc Santhoff
to Peter Vreman
Show quoted text 22 lines
At 14:29 21-3-2004, you wrote: >Hi! > >Using fpc 1.0.10 on FreeBSD ig do this: > >USB_DO_REQUEST : longword = 3222820207; > >and the compiler says: > >usb_h.pp(43,39) Error: Illegal expression > >Why thar? The maximum value of longword is bigger, and if i declare it >to be longint it compiles. But this constant is to be used for an >ioctl() and I'm afraid, the signed value will not work. > >USB_DO_REQUEST : longint = -1072147089; > >Compiling usb_h.pp >Assembling usb_h >45 Lines compiled, 0.0 sec Constants > maxlongint are not supported in 1.0.x. You need to use 1.9.x

Ah, I see.

Thank you,
Marc

Marco van de Voort
to Marc Santhoff
Show quoted text 8 lines
> > > >Compiling usb_h.pp > >Assembling usb_h > >45 Lines compiled, 0.0 sec > > Constants > maxlongint are not supported in 1.0.x. You need to use 1.9.x Ah, I see.

1.9.3 is in the ports tree as fpc-devel

Marc Santhoff
to Marco van de Voort
Show quoted text 8 lines
> > > > > >Compiling usb_h.pp > > >Assembling usb_h > > >45 Lines compiled, 0.0 sec > > > > Constants > maxlongint are not supported in 1.0.x. You need to use 1.9.x > > Ah, I see.

Thanks, I know from your earlier posting, but i can't switch at the moment and writing one C-function and linking the .o in is already here. ;)

Bye,
Marc