View Issue Details

IDProjectCategoryView StatusLast Update
0030859FPCDocumentationpublic2017-01-27 22:34
ReporterBob RichardsonAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.0.0Product Build 
Target Version3.2.0Fixed in Version3.1.1 
Summary0030859: Copy procedure
DescriptionDocumentation at:

http://www.freepascal.org/docs-html/rtl/system/copy.html

indicates 3 arguments in this procedure are required. I seem to remember that being the case. Now I have no problem compiling with just 2 arguments. It appears that this now works like the Delphi procedure. Yeah :) but the documentation needs to be changed.
Additional InformationIs there a way I can help with documentation?
TagsNo tags attached.
Fixed in Revision1384
FPCOldBugId
FPCTarget
Attached Files

Activities

Michael Van Canneyt

2016-11-04 09:27

administrator   ~0095544

Can you be more clear, because as far as I can see it is not allowed ?

var
  S : String;

begin
  S:='1234567890';
  Writeln(Copy(S,6));
end.

When compiling:

fpc tc.pp
tc.pp(6,17) Error: Type mismatch
tc.pp(8,2) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted


delfion

2016-11-04 09:58

reporter   ~0095545

program tc;
{$mode delphi}
var
  S : String;

begin
  S:='1234567890';
  Writeln(Copy(S,6));
end.

Compile:
fpc tc.pas
Free Pascal Compiler version 3.1.1 [2016/11/03] for i386
Copyright (c) 1993-2016 by Florian Klaempfl and others
Target OS: Linux for i386
Compiling tc.pas
Linking tc
9 lines compiled, 0.1 sec

Michael Van Canneyt

2017-01-27 22:34

administrator   ~0097756

Adapted the documentation, indeed the 2nd argument is optional.

Issue History

Date Modified Username Field Change
2016-11-04 01:13 Bob Richardson New Issue
2016-11-04 01:13 Bob Richardson Status new => assigned
2016-11-04 01:13 Bob Richardson Assigned To => Michael Van Canneyt
2016-11-04 09:27 Michael Van Canneyt Note Added: 0095544
2016-11-04 09:27 Michael Van Canneyt Status assigned => feedback
2016-11-04 09:58 delfion Note Added: 0095545
2017-01-27 22:34 Michael Van Canneyt Fixed in Revision => 1384
2017-01-27 22:34 Michael Van Canneyt Note Added: 0097756
2017-01-27 22:34 Michael Van Canneyt Status feedback => resolved
2017-01-27 22:34 Michael Van Canneyt Fixed in Version => 3.1.1
2017-01-27 22:34 Michael Van Canneyt Resolution open => fixed
2017-01-27 22:34 Michael Van Canneyt Target Version => 3.2.0