Recent

Author Topic: $V-  (Read 1511 times)

Nebulix

  • Newbie
  • Posts: 4
$V-
« on: May 26, 2015, 02:30:42 pm »
I get an error message : String types have to match exactly in $V+ mode. Though I put {$V-} in my program and units. How can I put the $V- options as default ?

howardpc

  • Hero Member
  • *****
  • Posts: 3183
Re: $V-
« Reply #1 on: May 26, 2015, 04:31:51 pm »
Do your routine(s) that give this error really need to pass (presumably) shortstring parameters by reference? Would passing by value be OK (which never invokes the $V compiler check)?

Nebulix

  • Newbie
  • Posts: 4
Re: $V-
« Reply #2 on: May 26, 2015, 05:19:43 pm »
I had a string[80] that I changed into a plain string and the compilation went on. Though I wish really to understand how the compilator options work in FP.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8112
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: $V-
« Reply #3 on: May 26, 2015, 08:40:51 pm »
I had a string[80] that I changed into a plain string and the compilation went on. Though I wish really to understand how the compilator options work in FP.
http://www.freepascal.org/docs-html/prog/progsu77.html