Interessante Frage.
Habe dazu gleich mal n Programm geschrieben, und hier mein Ergebnis Top 15:
(eigene Prozeduren hab ich aus der Wertung herausgenommen)
1. Random [ 138154 ]
2. WriteLong [ 95802 ]
3. ReadLong [ 90338 ]
4. ReadString [ 79845 ]
5. Str [ 72950 ]
6. Pow [ 60943 ]
7. Val [ 56359 ]
8. DrawText [ 53679 ]
9. Locate [ 50284 ]
10. NextElement [ 49382 ]
11. ResetList [ 49335 ]
12. LoadSprite [ 48504 ]
13. DisplaySprite3D [ 47913 ]
14. LoadSprite3D [ 45847 ]
15. Mid [ 45830 ]
In etwa das was ich erwartet habe ^^
zumindest Val() und Str() sollten zu den häufigsten Befehlen gehören ^^
Bei Spielen dann Sprite und co.
Code zum erfassen:
Code: Alles auswählen
Enumeration
#RegularExpression
EndEnumeration
CreateRegularExpression(#RegularExpression, "(?<![\.\w])[a-zA-Z_]\w*(?=(?:\.\w+\s*|\s*)\()")
Structure Befehl
Name$
Count.i
EndStructure
Global NewMap Befehl.i()
Global NewList Befehl2.Befehl()
Procedure FindAlFiles(DirectoryName$)
Debug ">> "+DirectoryName$
Protected File, Count, i
Protected Dim Result$(0)
Protected Directory = ExamineDirectory(#PB_Any, DirectoryName$, "*")
If Directory
While NextDirectoryEntry(Directory)
Select DirectoryEntryType(Directory)
Case #PB_DirectoryEntry_Directory
If DirectoryEntryName(Directory) <> "." And DirectoryEntryName(Directory) <> ".."
FindAlFiles(DirectoryName$+"\"+DirectoryEntryName(Directory))
EndIf
Case #PB_DirectoryEntry_File
If Left(GetExtensionPart(DirectoryEntryName(Directory)),2)="pb"
File = ReadFile(#PB_Any, DirectoryName$+"\"+DirectoryEntryName(Directory))
If File
Repeat
String$ = ReadString(File)
Count = ExtractRegularExpression(#RegularExpression, String$, Result$())
For i = 0 To Count-1
Befehl(Result$(i)) + 1
Next
Until Eof(File)
CloseFile(File)
EndIf
EndIf
EndSelect
Wend
EndIf
EndProcedure
FindAlFiles("D:\")
FindAlFiles("C:\")
ForEach Befehl()
AddElement(Befehl2())
Befehl2()\Name$ = MapKey(Befehl())
Befehl2()\Count = Befehl()
Next
SortStructuredList(Befehl2(), #PB_Sort_Descending, OffsetOf(Befehl\Count), #PB_Sort_Integer)
Top10 = 1
ForEach Befehl2()
Debug Str(Top10)+". "+Befehl2()\Name$+" [ "+Str(Befehl2()\Count)+" ]"
Top10 + 1
If Top10 = 21 : Break : EndIf
Next
Nehem ich nur meine Incldues erhalte ich:
1. SizeOf [ 262 ]
1. Str [ 135 ]
2. GradientColor [ 79 ]
3. Cos [ 75 ]
4. Sin [ 73 ]
5. DrawingMode [ 72 ]
6. ImageHeight [ 64 ]
7. ImageWidth [ 62 ]
8. StartDrawing [ 59 ]
9. StopDrawing [ 58 ]
10. AddElement [ 51 ]
11. Random [ 51 ]
12. Len [ 46 ]
13. RSet [ 45 ]