Difference between revisions of "Talk:Recursive filesearch"

From Freepascal Amiga wiki
Jump to navigation Jump to search
(? Operator has a 1:1 replacement in Pascal)
 
Line 10: Line 10:
 
</source>
 
</source>
  
one could write: if for strings need Unit StrUtils, for number need unit Math
+
one could write:  
  
 
<source lang=pascal>
 
<source lang=pascal>
 
s := IfThen(ap^.ap_Info.fib_DirEntryType < 0, '', 'Dir')
 
s := IfThen(ap^.ap_Info.fib_DirEntryType < 0, '', 'Dir')
 
</source>
 
</source>
[[User:Alb42|Freepascal aros porter]] ([[User talk:Alb42|talk]]) 11:08, 17 August 2014 (CEST)
+
(if for strings need Unit StrUtils, for number need unit Math)
 +
 
 +
Besides I'm a little bit worried, that a '''recursive''' Filesearch is not coded recursively :-)
 +
--[[User:Alb42|ALB42]] ([[User talk:Alb42|talk]]) 11:11, 17 August 2014 (CEST)
 
----
 
----

Revision as of 11:11, 17 August 2014


Hint "?" Operator does not exist but there is a replacement:

if (ap^.ap_Info.fib_DirEntryType < 0) then 
begin 
  s := '';  
end else
  s := 'Dir';

one could write:

s := IfThen(ap^.ap_Info.fib_DirEntryType < 0, '', 'Dir')

(if for strings need Unit StrUtils, for number need unit Math)

Besides I'm a little bit worried, that a recursive Filesearch is not coded recursively :-) --ALB42 (talk) 11:11, 17 August 2014 (CEST)