![]() |
Wohin mit der Funktion?
program Gregor;
var a,b,c,d,e,f,k,k2,t,m,n,j,jh,jz,wt: Integer;wts:string; begin // // // function isleapyear(year):Boolean; begin // // // end; end. //Free Pascal Online Compiler [fpc-2.6.4] Copyright (c) Florian Klaempfl and others Compiling your program... prog.pas(8,1) Error: Illegal expression prog.pas(8,10) Fatal: Syntax error, ";" expected but "identifier ISLEAPYEAR" found Fatal: Compilation aborted Error: /usr/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled) |
AW: Wohin mit der Funktion?
Delphi-Quellcode:
versuch's mal so.
function isleapyear(year:word):Boolean;
Gruß K-H |
AW: Wohin mit der Funktion?
Gleiche Fehlermeldungen :oops:
|
AW: Wohin mit der Funktion?
.. vielleicht so?
Code:
Grüße
program Gregor;
var a,b,c,d,e,f,k,k2,t,m,n,j,jh,jz,wt: Integer;wts:string; function isleapyear(year: word):Boolean; begin // // // end; begin // // // end. Klaus |
AW: Wohin mit der Funktion?
'ne Funktionsdeklaration gehört vor das begin und nicht in den Bereich zwischen begin und end.
|
AW: Wohin mit der Funktion?
Free Pascal Online Compiler [fpc-2.6.4]
Copyright (c) Florian Klaempfl and others Compiling your program... prog.pas(1,5) Fatal: Syntax error, "BEGIN" expected but "identifier CODE" found Fatal: Compilation aborted Error: /usr/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled) |
AW: Wohin mit der Funktion?
FPC unterstützt verschiedene Pascal Dialekte. Für diesen Code würde ich den Delphi Modus wählen, entweder in den Projektoptionen oder mit {$MODE DELPHI} am Anfang des Programms.
|
AW: Wohin mit der Funktion?
Vielleicht so?
Delphi-Quellcode:
program Gregor;
function isleapyear(year: word): Boolean; begin // end; procedure main; var a,b,c,d,e,f,k,k2,t,m,n,j,jh,jz,wt: Integer; wts: string; begin // end; begin main; end. |
AW: Wohin mit der Funktion?
@ Detlef
Free Pascal Online Compiler [fpc-2.6.4] Copyright (c) Florian Klaempfl and others Compiling your program... prog.pas(11,1) Note: Local variable "a" not used prog.pas(11,3) Note: Local variable "b" not used prog.pas(11,5) Note: Local variable "c" not used prog.pas(11,7) Note: Local variable "d" not used prog.pas(11,9) Note: Local variable "e" not used prog.pas(11,11) Note: Local variable "f" not used prog.pas(11,13) Note: Local variable "k" not used prog.pas(11,15) Note: Local variable "k2" not used prog.pas(11,18) Note: Local variable "t" not used prog.pas(11,20) Note: Local variable "m" not used prog.pas(11,22) Note: Local variable "n" not used prog.pas(11,24) Note: Local variable "j" not used prog.pas(11,26) Note: Local variable "jh" not used prog.pas(11,29) Note: Local variable "jz" not used prog.pas(11,32) Note: Local variable "wt" not used prog.pas(11,44) Note: Local variable "wts" not used prog.pas(18,4) Fatal: Syntax error, ";" expected but "." found Fatal: Compilation aborted @ mjustin Der Compilerschalter akzeptiert zumindest die Funktion, wenn ich result:= einfüge, Fehlermeldungen bleiben Es ist zum Mäusemelken Lt.. Manual gehört die Prozedur ins HP. Geht aber nicht. Verschiebung oberhalb von program geht sucht nicht! Ich will TP7 for IPad :oops::oops::cry: |
AW: Wohin mit der Funktion?
Ich habe es:firejump::bounce1::bounce1:bounce1:
So will der Compiler: {$Mode Delphi} program Gregor; uses crt; var a,b,c,d,e,f,k,k2,t,m,n,j,jh,jz,wt: Integer;wts:string; function isleapyear(year:word):Boolean; begin result:=true; end; begin end. Free Pascal Online Compiler [fpc-2.6.4] Copyright (c) Florian Klaempfl and others Compiling your program... Build completed successfully! Running your program... The program executed successfully! |
Alle Zeitangaben in WEZ +1. Es ist jetzt 03:19 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz