View Issue Details

IDProjectCategoryView StatusLast Update
0038529FPCDocumentationpublic2021-03-08 14:23
ReporterCudaText man Assigned ToMichael Van Canneyt  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Fixed in Version3.3.1 
Summary0038529: Docs for SScanf is weird
Descriptionhttps://www.freepascal.org/docs-html/rtl/sysutils/sscanf.html

Here it tells
a) function "return the substrings". So I expect that func returns array of string, or StringList or several strings.
b) result is integer! so it don't "return substrings" at all.
c) "returns the elements in the pointers in Pointers.". What it means?? It fills the Pointers array? but it's "const"!

Pls rewrite text. Pls example.
TagsNo tags attached.
Fixed in Revision1809
FPCOldBugId
FPCTarget3.2.2
Attached Files

Activities

delfion

2021-02-22 10:15

reporter   ~0129085

Example
program Project1;
uses sysutils;
var
  count,i: Integer;
  f:Extended;
  s:string;
begin
  count:=SScanf('234 32.4 hello','%d %f %s',[@i,@f,@s]);
  writeln(count,' ',i,' ',f,' ',s);
end.

Michael Van Canneyt

2021-03-07 11:53

administrator   ~0129469

I changed the wording, added a statement that the return value is the number of found values.
I also added the example of Delfion.

@delfion: thank you for the example!

Issue History

Date Modified Username Field Change
2021-02-22 09:43 CudaText man New Issue
2021-02-22 09:43 CudaText man Status new => assigned
2021-02-22 09:43 CudaText man Assigned To => Michael Van Canneyt
2021-02-22 10:15 delfion Note Added: 0129085
2021-03-07 11:53 Michael Van Canneyt Status assigned => resolved
2021-03-07 11:53 Michael Van Canneyt Resolution open => fixed
2021-03-07 11:53 Michael Van Canneyt Fixed in Version => 3.3.1
2021-03-07 11:53 Michael Van Canneyt Fixed in Revision => 1809
2021-03-07 11:53 Michael Van Canneyt FPCTarget => 3.2.2
2021-03-07 11:53 Michael Van Canneyt Note Added: 0129469
2021-03-08 14:23 CudaText man Status resolved => closed