PDA

View Full Version : Dynamic arrays in Dev-Pascal



Captain_Thunder
26-08-2007, 03:29 PM
System: Windows XP
Compiler/IDE: Free Pascal with Dev Pascal
API: None

According to the Free Pascal reference manual, I should be able to define dynamic arrays like so:



type intarray = array of integer;
var arr : intarray;


But the compiler gives me an error on the first line, saying "[ expected by OF found"

I've looked in the Options menu, and I'm using Free Pascal as my compiler, so why would the reference manual syntax not work?[/code]

Legolas
26-08-2007, 04:06 PM
IIRC Dev-Pascal is shipped with an ooooooold fpc version. Maybe that synthax is available in a recent version only.

Captain_Thunder
26-08-2007, 04:43 PM
You're right, this version was created in 2002.

I would just be using the latest version of Free Pascal, but whenever I started the text-mode IDE (either from the command prompt or by double-clicking it from Windows Explorer), it wouldn't respond to any mouse movements; the keyboard wouldn't do anything either, although by hitting random keys I could get what looked like a cursor to move across the screen.

Any ideas?

Captain_Thunder
26-08-2007, 10:50 PM
OK, I'm set up with emacs and the latest version of Free Pascal now. Is anyone else having the same problem with the Free Pascal IDE?

WILL
27-08-2007, 04:42 AM
If you want a good IDE for FPC try Lazarus, they stay up to date and you don't need to compile with any of the LCL if you want a strait FPC compiled exe.

Besides the Turbo Vision style IDE is a bit antiquated no? :)

dmantione
27-08-2007, 12:17 PM
You're right, this version was created in 2002.

I would just be using the latest version of Free Pascal, but whenever I started the text-mode IDE (either from the command prompt or by double-clicking it from Windows Explorer), it wouldn't respond to any mouse movements; the keyboard wouldn't do anything either, although by hitting random keys I could get what looked like a cursor to move across the screen.

Any ideas?

No. However, some versions of Windows disable the mouse by default. Simply open the properties of the text mode window and enable the mouse.

That doesn't explain why the keyboard doesn't work though.