x.....
The TS should got a compile-time error, didn't he?
Compiling H:\lazarus-forums\39375\test.pastest.pas(13,11) Warning: Variable "j" does not seem to be initializedtest.pas(4,7) Note: Local variable "k" not usedtest.pas(4,11) Note: Local variable "bx" not usedtest.pas(4,14) Note: Local variable "by" not usedtest.pas(4,17) Note: Local variable "yy" not usedtest.pas(4,20) Note: Local variable "xx" not usedtest.pas(4,23) Note: Local variable "v" not usedtest.pas(4,25) Note: Local variable "v2" not usedtest.pas(5,1) Note: Local variable "x" is assigned but never usedtest.pas(6,1) Note: Local variable "y" is assigned but never usedtest.pas(7,1) Note: Local variable "h" not used
The TS should got a compile-time error, didn't he?Maybe he simply ignored that message.
Quote from: Handoko on December 21, 2017, 06:50:53 pmThe TS should got a compile-time error, didn't he?I'm very curious to know why one might think that. Seems i'm missing something obvious
"arraystest.pas(11,12) Error: Incompatible types: got "LongInt" expected "Array[1..5] Of LongInt""
The error message was very clear, it even has line number and column position.Beginner's common error: too lazy to read.
Quote from: molly on December 21, 2017, 06:56:23 pmQuote from: Handoko on December 21, 2017, 06:50:53 pmThe TS should got a compile-time error, didn't he?I'm very curious to know why one might think that. Seems i'm missing something obvious Yes. X. His code does not compile... try copy paste.. should be Code: Pascal [Select][+][-]x[i]"arraystest.pas(11,12) Error: Incompatible types: got "LongInt" expected "Array[1..5] Of LongInt""
Code: Pascal [Select][+][-] x[i]:=random(40); // there's your bug