* * *

Author Topic: error  (Read 1414 times)

bradyhartsfield

  • New member
  • *
  • Posts: 41
error
« on: December 28, 2017, 02:31:29 pm »
Quote
unit1.pas(63,8) Error: Incompatible types: got "ShortInt" expected "Array[1..19] Of LongInt"
I got five more of exact these


regards
brady

molly

  • Hero Member
  • *****
  • Posts: 2345
Re: error
« Reply #1 on: December 28, 2017, 02:38:18 pm »
hi bradyhartsfield,

Welcome to these forums. I see you struggling.

A few hints:
- When you post code(snippets) alway use code tags around your code.
- When you receive an error as you posted, how are we suppose to know what is wrong exactly ? The compiler gives you a clue, but because we cannot see what you have in front of you there is hardly any hint we are able to give you other then which the compiler is already telling you.

In this specific case you are providing a ShortInt while whatever assignment or call is expecting an array[1..19] of LongInt.

If you wish to have better feedback hen either post a snippet or your complete code that leads up to these errors.
« Last Edit: December 28, 2017, 02:40:08 pm by molly »

bytebites

  • Full Member
  • ***
  • Posts: 151
Re: error
« Reply #2 on: December 28, 2017, 02:57:14 pm »

molly

  • Hero Member
  • *****
  • Posts: 2345
Re: error
« Reply #3 on: December 28, 2017, 03:18:24 pm »
It seems that way bytebites.

Reason i did not respond into the other thread is that this is an isolated error probably related to not understanding arrays. The other thread "screams" wanting to have code posted. So instead of TS' attempt to divide and conquer perhaps it would be better for TS to provide some meaningful feedback so that the topic of arrays becomes more clear for TS.

Let me try fast forward things a little: does bradyhartsfield understand the concept of records ? And as follow-up question: arrays ? And finally: array of records ?

Handoko

  • Hero Member
  • *****
  • Posts: 2386
  • My goal: build my own game engine using Lazarus
Re: error
« Reply #4 on: December 28, 2017, 04:10:58 pm »
Same problen here? https://forum.lazarus.freepascal.org/index.php/topic,39433.0.html

Can anyone tell me, why the thread in the link above is locked?
I was trying to write a reply there, but cannot.

Thaddy

  • Hero Member
  • *****
  • Posts: 6364
Re: error
« Reply #5 on: December 28, 2017, 04:13:15 pm »
Utter nonsense needs to be in jail. permanently.
I am enjoining wine, not whine....

molly

  • Hero Member
  • *****
  • Posts: 2345
Re: error
« Reply #6 on: December 28, 2017, 05:13:37 pm »
Can anyone tell me, why the thread in the link above is locked?
I was trying to write a reply there, but cannot.
If i would have to guess: probably because it was already a repost from this one.

Divide and conquer  ;)

bradyhartsfield

  • New member
  • *
  • Posts: 41
Re: error
« Reply #7 on: December 28, 2017, 09:58:15 pm »
sorry guys for this mess!
i now know how to post correctly and solved my problem with this error.

sorry for the confusion!

regards
brady

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus