Recent

Author Topic: What i did wrong?  (Read 2660 times)

Matija1111

  • Newbie
  • Posts: 1
What i did wrong?
« on: January 16, 2018, 08:14:16 pm »
It says that c is incompatible... idk where im wrong...
Please help me i have test tomorrow

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: What i did wrong?
« Reply #1 on: January 16, 2018, 08:20:53 pm »
the message says that it expects to find a dot after the end statement instead it finds an other end statement.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11459
  • FPC developer.
Re: What i did wrong?
« Reply #2 on: January 16, 2018, 08:35:06 pm »
1x begin, 2x end. Not  balanced

RAW

  • Hero Member
  • *****
  • Posts: 868
Re: What i did wrong?
« Reply #3 on: January 17, 2018, 01:03:15 am »
Delphi 7 is still used in schools ??? Really ?  :)
1. What's wrong with LAZARUS?
2. What's wrong with INC?


Code: Pascal  [Select][+][-]
  1. PROGRAM WhatIsWrongWithInc;
  2.  
  3.  USES
  4.   SysUtils;
  5.  
  6.  VAR
  7.   i, p, m, n, c: Integer;
  8.  
  9.  
  10. BEGIN
  11.  i:= 0;
  12.  p:= 0;
  13.  
  14.  m:= 100;
  15.  n:=  50;
  16.  
  17.  Repeat
  18.   Inc(i);
  19.   Inc(p);
  20.  Until (i > n) And (p > m);
  21.  
  22.  c:= m*n;
  23.  
  24.  WriteLn(i);
  25.  WriteLn(p);
  26.  WriteLn(c);
  27.  
  28.  ReadLn;
  29. END.
Windows 7 Pro (x64 Sp1) & Windows XP Pro (x86 Sp3).

madref

  • Hero Member
  • *****
  • Posts: 954
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: What i did wrong?
« Reply #4 on: January 17, 2018, 10:24:22 pm »
Old School  :D
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Lazarus 3.99 (rev main_3_99-649-ge13451a5ab) FPC 3.3.1 x86_64-darwin-cocoa
Mac OS X Monterey

 

TinyPortal © 2005-2018