Discussion:
Types of actual and formal var parameters must be identical - ?
(too old to reply)
name
2003-08-29 19:36:04 UTC
Permalink
if SelectDirectory('Where to look','',dir) then //error

Types of actual and formal var parameters must be identical.

Um ... ?
http://planetsourcecode.com/vb/scripts/ShowZip.asp?lngWId=7&lngCodeId=1225&strZipAccessCode=tp%2FA12250182
It says compile to use and I get that error at design time. I dont
understand what the error means in this case. help
name
2003-08-29 23:26:48 UTC
Permalink
name wrote in message ...
Post by name
if SelectDirectory('Where to look','',dir) then //error
Types of actual and formal var parameters must be identical.
The first parameter to SelectDirectory is a var parameter,
so you need a variable in the call.
The error message is a bit unfortunate.
I dont understand how to make it work.
Is it flawed by design or is it just a simple error? This app is ment to be
a demo but it seems to be full of glitches and i really have no desire to
reright the application.
Groetjes,
Maarten Wiltink
Nicholas Sherlock
2003-08-30 01:18:36 UTC
Permalink
Post by name
if SelectDirectory('Where to look','',dir) then //error
Types of actual and formal var parameters must be identical.
Um ... ?
http://planetsourcecode.com/vb/scripts/ShowZip.asp?lngWId=7&lngCodeId=1225&s
trZipAccessCode=tp%2FA12250182
Post by name
It says compile to use and I get that error at design time. I dont
understand what the error means in this case. help
It wants a variable, so you have to call it like this:

var wheretolook:string;
begin
wheretolook:='where to look';
selectdirectory(wheretolook,'',dir) then (etc)
end;

Cheers,
Nicholas Sherlock
Rob Kennedy
2003-08-30 03:23:26 UTC
Permalink
Post by name
if SelectDirectory('Where to look','',dir) then //error
Types of actual and formal var parameters must be identical.
That usage of SelectDirectory is fine for the VCL version of that
function. There are some other renditions of that function that are only
valid in the CLX version. Since I only have Delphi 5, I cannot help you
sort out the difference between VCL and CLX. I do know that you'll need
to get rid of any units from the uses clause that start with Q, such as
QDialogs.
--
Rob
Loading...