Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

missing operator or semicolon

Status
Not open for further replies.

annmartinson

Programmer
Aug 7, 2005
2
0
0
US
yes, I know I'm doing something stupid, but I've got like 15 of these errors when I'm trying to run and I have no idea what it is wanting. I've tried copying and pasting in lines of code that do work, and it doesn't help.

can anyone tell my looking what syntax I might be missing?

sizeoffile:= IntToStr(FileSize(fileData.InstanceSize));

above, these are declared ...
Form1: TForm1;
fileName : String;
myFile : File of Byte;
fileData : TStringList;
openDialog : TOpenDialog;
fileSize, lastsize1 : Integer;
sizeoffile: Longint;
compression1 : Single;

appreciate any offered help. let me know if this isn't enough to tell anything and I'll post up more. thanks much.
 
You really haven't posted anything that's indicative of the error. You might start by looking at the lines the compiler is pointing out and correct the error.

As for what you posted, IntToStr translates an integer to a string, yet you are putting it into an integer (longint). Remove this function call if you want that line to be good.

----------
Measurement is not management.
 
The error message that you are getting indicates that you are missing a semicolon on the previous line of code.

E.g.
Code:
  x := 1
  sizeoffile:= IntToStr(FileSize(fileData.InstanceSize));
Whilst the compiler flags up the second line, your error is on the previous line i.e. it should be
Code:
  x := 1[b];[/b]
  sizeoffile:= IntToStr(FileSize(fileData.InstanceSize));

Andrew
Hampshire, UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top