Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Delphi: Types of actual and formal var parameters must be identical [modified]

Delphi: Types of actual and formal var parameters must be identical [modified]

Scheduled Pinned Locked Moved Visual Basic
helpdelphiquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lil_nicci
    wrote on last edited by
    #1

    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!

    G 1 Reply Last reply
    0
    • L lil_nicci

      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!

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      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; }

      L 1 Reply Last reply
      0
      • G Guffa

        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; }

        L Offline
        L Offline
        lil_nicci
        wrote on last edited by
        #3

        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!

        G 1 Reply Last reply
        0
        • L lil_nicci

          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!

          G Offline
          G Offline
          Guffa
          wrote on last edited by
          #4

          How do you call the method?

          --- b { font-weight: normal; }

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups