irritaiting type mistmatch

hy there!
i would be very grateful if someone could point me in the right direction with this error
i have a type mistamatch at the bottom of the program ,more exactly at
[italic]"secventa(m,secv,valori) "[/italic]
the thing is usually i see this kind of errors and i understand them and i know where it should be fixed but somehow in this case i really dont see it

i had an exercise at school where i was asked to make a program wich will read asequence of sequences ended by 0 and the sequence itself by the empty seq.[italic]( ex input: 12,3,4,0,5,6,0,1,11,5,0,0->output:
12 3 4
5 6
1 11 5)[/italic]and for every sub sequence[italic](like 12 3 4)[/italic] i have to display the longest with some kind of propriety (like all numbers should be even or odd and so on,but in my case it was that every 2 numbers in a row should have at lest 2 figures in common [italic](for ex: 1234 and 24 meet the condition given but 1234 and 48 do not)[/italic]
and then to display the set of values of the numbers previously displayed.
i have attached a document with the .pas code
please someone check it out ^^



Comments

  • [b]secventa[/b] expects its second parameter to be a [b]vector[/b] but you have passed it [b]secv[/b] which is an array. Never mind that [b]vector[/b] is an array of exactly the same type, the definition of Pascal says they are not the same thing. Your solution is to declare [b]secv[/b] to be a [b]vector[/b].
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion