Delphi: Types of actual and formal var parameters must be identical [modified]
-
i know this is vb forum but i am really struggling with this subject and i tihnk this is probably the best forum i know of to get advice. Types of actual and formal var parameters must be identical this error message is appearing when i call a function within another function. Does any one know what would cause this? And also i and getting an Incompatible types: 'String' and 'Integer' for an integer but i have declared both the variables as ints and i am jsut passing one into the other, i would really appreciate any help and if anyone would like me to be more specific jsut ask. Thanks nicci. -- modified at 16:34 Monday 27th November, 2006
to err is to be human but to really foul things up you need a computer!
-
i know this is vb forum but i am really struggling with this subject and i tihnk this is probably the best forum i know of to get advice. Types of actual and formal var parameters must be identical this error message is appearing when i call a function within another function. Does any one know what would cause this? And also i and getting an Incompatible types: 'String' and 'Integer' for an integer but i have declared both the variables as ints and i am jsut passing one into the other, i would really appreciate any help and if anyone would like me to be more specific jsut ask. Thanks nicci. -- modified at 16:34 Monday 27th November, 2006
to err is to be human but to really foul things up you need a computer!
lil_nicci wrote:
Does any one know what would cause this?
Because you are not using a value that has the same type as the parameter, or can not be automatically converted to that type.
lil_nicci wrote:
And also i and getting an for an integer
What?
--- b { font-weight: normal; }
-
lil_nicci wrote:
Does any one know what would cause this?
Because you are not using a value that has the same type as the parameter, or can not be automatically converted to that type.
lil_nicci wrote:
And also i and getting an for an integer
What?
--- b { font-weight: normal; }
sorry that was a bit soft off me i comment out the error messages. this is the function i have: procedure TfrmStandardConversion.SplitPND1D2D3(const suppnco: String; out D1S, D2S, D3S: Integer; out suppnc: String; out ErrorCode: Integer); var D1A, D2A, D3A: Integer; supp_pnA: String; begin ErrorCode:=0; //First we need to see if the var we are passed IS 19 long. if (Length(suppnco)=19) then begin supp_pnA := StringReplace(Copy(suppnco, 1, 6), ' ', '', [rfReplaceAll, rfIgnoreCase]); if (Length(supp_pnA) <> 6) then ErrorCode:=3; if (Length(StringReplace(Copy(suppnco, 9, 3), ' ', '', [rfReplaceAll, rfIgnoreCase])) = 0) then ErrorCode:=4; if (Length(StringReplace(Copy(suppnco, 13, 3), ' ', '', [rfReplaceAll, rfIgnoreCase])) = 0) then ErrorCode:=4; if (Length(StringReplace(Copy(suppnco, 17, 3), ' ', '', [rfReplaceAll, rfIgnoreCase])) = 0) then ErrorCode:=4; try D1A := StrToInt(Copy(suppnco, 9, 3)); except on Exception : EConvertError do ErrorCode:=2; end; try D2A := StrToInt(Copy(suppnco, 13, 3)); except on Exception : EConvertError do ErrorCode:=2; end; try D3A := StrToInt(Copy(suppnco, 17, 3)); except on Exception : EConvertError do ErrorCode:=2; end; if (ErrorCode = 0) then begin suppnc := supp_pnA; D1S := D1A; D2S := D2A; D3S := D3A; end; end else ErrorCode:=1; end; and i want to extract the three D1S, D2S, D3S and suppnc and i think i an getting stuck because of the contents of the parameters when i have called the function. do you know what i should put. thank you btw!
to err is to be human but to really foul things up you need a computer!
-
sorry that was a bit soft off me i comment out the error messages. this is the function i have: procedure TfrmStandardConversion.SplitPND1D2D3(const suppnco: String; out D1S, D2S, D3S: Integer; out suppnc: String; out ErrorCode: Integer); var D1A, D2A, D3A: Integer; supp_pnA: String; begin ErrorCode:=0; //First we need to see if the var we are passed IS 19 long. if (Length(suppnco)=19) then begin supp_pnA := StringReplace(Copy(suppnco, 1, 6), ' ', '', [rfReplaceAll, rfIgnoreCase]); if (Length(supp_pnA) <> 6) then ErrorCode:=3; if (Length(StringReplace(Copy(suppnco, 9, 3), ' ', '', [rfReplaceAll, rfIgnoreCase])) = 0) then ErrorCode:=4; if (Length(StringReplace(Copy(suppnco, 13, 3), ' ', '', [rfReplaceAll, rfIgnoreCase])) = 0) then ErrorCode:=4; if (Length(StringReplace(Copy(suppnco, 17, 3), ' ', '', [rfReplaceAll, rfIgnoreCase])) = 0) then ErrorCode:=4; try D1A := StrToInt(Copy(suppnco, 9, 3)); except on Exception : EConvertError do ErrorCode:=2; end; try D2A := StrToInt(Copy(suppnco, 13, 3)); except on Exception : EConvertError do ErrorCode:=2; end; try D3A := StrToInt(Copy(suppnco, 17, 3)); except on Exception : EConvertError do ErrorCode:=2; end; if (ErrorCode = 0) then begin suppnc := supp_pnA; D1S := D1A; D2S := D2A; D3S := D3A; end; end else ErrorCode:=1; end; and i want to extract the three D1S, D2S, D3S and suppnc and i think i an getting stuck because of the contents of the parameters when i have called the function. do you know what i should put. thank you btw!
to err is to be human but to really foul things up you need a computer!