SlideShare a Scribd company logo
1 of 9
Download to read offline
Best of Runtime Library
Inhalt
Content
Contenu
Contenido
Contenudo




 Sep. 2011   softwareschule.ch   1
RTL is a Built In Delphi's
             Functions and Procedures
             Collection
1.   Has a Version:

const
 RTLVersion = 18.00; {(* You can use RTLVersion in $IF expressions to test the
    runtime library version level independently of the compiler version level.
 Example: {$IF RTLVersion >= 16.8} ... {$IFEND} *)


2.   Routines are organised by Units:

Classes, DateUtils, Dialogs, Math, Masks, FileCtrl, System, ShareMem, StrUtils,
    SysUtils, Types (check the Docu rtl manual fpc)

3.   SysUtils is well documented! (RealTimeLib or RichTimeLib or RoutineTimeLib)

Sep. 2011                               softwareschule.ch                          2
RTL as Objects (Object Binding)
1.    Name Conflicts Possible:

Procedure ProcessPath(const EditText: string; var Drive: Char; var DirPart: string; var
               FilePart: string);'); //unit FileCtrl versus unit IdGlobal //or JCLMath.pas

Objects are wrapped by Routines:

      function GrabLine2(const s: string; ALine: Integer): string;
2.    var
3.      sl: TStringList;
4.    begin
5.      sl:= TStringList.Create;
6.      try
7.        sl.LoadFromFile(s);
8.        Result:= sl[ALine - 1]; // index off by one
9.      finally
10.       sl.Free;
11.    end;
12.   end;


2.    unit Contnrs; is the Collection of Objects and his routines

Sep. 2011                                          softwareschule.ch                         3
Objectives
 Topic Overview: Localizing RTL Categories

  Arithmetic routines                        Floating/Type conversions
  Business and finance routines              Geometric routines
  Command line utilities                     Measurement conversion
  Character manipulation                     Numeric formatting routines
  Date/Time routines                         Ordinal routines
  Dialog and Message routines                Pointer and address routines
  File/Text Management                       Random number routines
  File Name Utilities                        String handling routines
  Flow Control Routines                      String formatting routines
  Sep. 2011                         softwareschule.ch                       4
RTL is platformindenpendent or at least

  begin
      {$IFDEF LINUX}
       dllhandle:= dlopen(PChar(s2), RTLD_LAZY);
      {$ELSE}
       dllhandle:= LoadLibrary(Pchar(s2));
      {$ENDIF}
       if dllhandle = {$IFDEF LINUX} NIL {$ELSE} 0 {$ENDIF} then

  {$IFDEF LINUX}
   p.Ext1:= dlsym(dllhandle, pchar(copy(s, 1, pos(#0, s)-1)));
  {$ELSE}
   p.Ext1:= GetProcAddress(dllhandle, pchar(copy(s, 1, pos(#0, s)-1)));
  {$ENDIF}


  Sep. 2011                     softwareschule.ch                         5
Best of I
 //You can test all Functions in one Script „165_best_of_runtime2.txt“:

     http://www.sourceforge.net/projects/maxbox

 //Function ABNFToText(const AText : String): String; //Indy unit IdGlobal
 //Function BytesToString(ABytes: TIdBytes; AStartIndex: Integer; AMaxCount: Integer): string;
 //Function ChangeFileExt(const FileName: string; const Extension: string): string); /SysUtils
 //Function CharToHexStr(Value: char): string); //Indy
 //Function CompareDateTime(const ADateTime1, ADateTime2 : TDateTime) : Integer; /DateUtils
 //Function CompareText(const S1: string; const S2: string): Integer); /SysUtils
 //Function TextIsSame(const A1: string; const A2: string): Boolean; /SysUtils
 //Function ContainsText(const AText, ASubText: string): Boolean; /StrUtils
 //Function CopyFileTo(const Source, Destination: string): Boolean; //Indy
 //Function CurrentProcessId: TIdPID;
 //Function CurrentThreadId: TIdPID;
 //Function DecodeDateFully(DateTime: TDateTime; var Year, Month, Day, DOW: Word): Boolean;
 //Function DomainName(const AHost: String): String; //Indy /SysUtils^
 //Function DupeString(const AText: string; ACount: Integer) : string; /StrUtils
 //Function ExePath: string; //mXUtils

  Sep. 2011                                  softwareschule.ch                             6
Best of II

 //Function Fetch(var AInput: string; const ADelim: string; const ADelete: Boolean; const //Indy
 //Function FindCmdLineSwitch(Switch : string; IgnoreCase : Boolean): Boolean; /SysUtils
 //Function FloatToCurr(Value: Extended): Currency; /SysUtils
 //Function Format(const Format: string; const Args: array of const): string; /SysUtils
 //Function FutureValue(NPeriods:Integer; const Payment,PresentValue, FutureValue… /Math
 //Function GetClockValue: Int64; //Indy…..
 //Function GetTickCount: Cardinal; // 4294967296 ms are ~ 49,7 days
 //Function GetTickDiff(const AOldTickCount, ANewTickCount: Cardinal): Cardinal;
 //Function GetVersionString(FileName: string): string; //Jedi…
 //Function GetAssociatedProgram(const Extension:string; var Filename,Description:string): bool;
 //Function GetHostName: string;
 //Function HexStrToStr(Value: string): string;
 //Function IfThen(AValue: Boolean; const ATrue : string; AFalse: string): string; /Math
 //Function InputBox(const ACaption:string; const APrompt:string; /Dialogs
 //Function LoadStr(Ident: Integer): string; /SysUtils
 //Function Mean(const Data: array of Double): Extended; /Math… //_27
 //Function StdDev(const Data: array of Double): Extended;
 //Procedure MeanAndStdDev(const Data: array of Double; var Mean, StdDev: Extended);

  Sep. 2011                                softwareschule.ch                                       7
Best of III

 //Function ProcessPath(const ABasePath:String; /FileCtrl, Dialogs…
 //Function PromptForFileName(var AFileName:string; const AFilter:string; const ADefaultExt:
            string;' const ATitle: string;const AInitialDir:string;SaveDialog: Boolean): Boolean);
 //Function ServicesFilePath: string; //Indy…Jedi
 //Function ShellExecute(hWnd: HWND; +Operation, FileName, Parameters,Directory: string);
 //Function SYDDepreciation(const Cost, Salvage: Extended; Life,Period: Integer): Extended; !
 //Function StrHtmlDecode(const AStr : String): String;
 //Function StrHtmlEncode(const AStr : String): String;
 //Function DateTimeToInternetStr(now, true))
 //Function LoadFileAsString( const FileName : string) : string'); //FileUtils Jedi
 //Procedure CreateFileFromString( const FileName, Data : string)');
 //Procedure ShowFileProperties(const FileName: string);
 //Procedure GetConvTypes(const AFamily: TConvFamily; out ATypes: TConvTypeArray);
 //Procedure GetConvFamilies(out AFamilies: TConvFamilyArray); /ConvUtils

                                                                    function ReturnAddr: Pointer;
                                                                     asm
                                                                          MOV EAX,[EBP+4]
                                                                     end;
   Sep. 2011                                  softwareschule.ch                                      8
Wishes Realised in the End…

  Binary streams manipulation with TBinaryReader and TBinaryWriter.
    * A regular expression library has been integrated into the Delphi RTL:
        o RegularExpressions
             + RegularExpressions.TRegEx is the main record for the user to match and
             replace with reg ex. The members of the RegEx unit make up an interface very
             close to the MSDN, except RegEx is implemented with records instead of
             classes, and therefore it does not use inheritance.
        o RegularExpressionsCore
             + RegularExpressionsCore.TPerlRegEx implements Perl-compatible regex.
             The RegExCore interface can be called directly, but is also the underlying base
             for the RegEx interface.
    * New file management extensions:
        o Added Support for Symbolic Links -- TSymLinkRec.
        o New functionalities for TPath, TDirectory, and TFile records.
        o A new Windows-specific method, TPath.GetHomePath, which returns the path
          to the application data folder.
    * Unicode support for strings stored on files.


  Sep. 2011                                softwareschule.ch                                   9

More Related Content

What's hot

Parsers Combinators in Scala, Ilya @lambdamix Kliuchnikov
Parsers Combinators in Scala, Ilya @lambdamix KliuchnikovParsers Combinators in Scala, Ilya @lambdamix Kliuchnikov
Parsers Combinators in Scala, Ilya @lambdamix KliuchnikovVasil Remeniuk
 
Take advantage of C++ from Python
Take advantage of C++ from PythonTake advantage of C++ from Python
Take advantage of C++ from PythonYung-Yu Chen
 
Notes about moving from python to c++ py contw 2020
Notes about moving from python to c++ py contw 2020Notes about moving from python to c++ py contw 2020
Notes about moving from python to c++ py contw 2020Yung-Yu Chen
 
Golang iran - tutorial go programming language - Preliminary
Golang iran - tutorial  go programming language - PreliminaryGolang iran - tutorial  go programming language - Preliminary
Golang iran - tutorial go programming language - Preliminarygo-lang
 
Hadoop_Pennonsoft
Hadoop_PennonsoftHadoop_Pennonsoft
Hadoop_PennonsoftPennonSoft
 
XPath - A practical guide
XPath - A practical guideXPath - A practical guide
XPath - A practical guideTobias Schlitt
 
06 file processing
06 file processing06 file processing
06 file processingIssay Meii
 
Natural Language Toolkit (NLTK), Basics
Natural Language Toolkit (NLTK), Basics Natural Language Toolkit (NLTK), Basics
Natural Language Toolkit (NLTK), Basics Prakash Pimpale
 
Lisp for Python Programmers
Lisp for Python ProgrammersLisp for Python Programmers
Lisp for Python ProgrammersVsevolod Dyomkin
 
Re-engineering Eclipse MDT/OCL for Xtext
Re-engineering Eclipse MDT/OCL for XtextRe-engineering Eclipse MDT/OCL for Xtext
Re-engineering Eclipse MDT/OCL for XtextEdward Willink
 
Trivadis TechEvent 2016 Go - The Cloud Programming Language by Andija Sisko
Trivadis TechEvent 2016 Go - The Cloud Programming Language by Andija SiskoTrivadis TechEvent 2016 Go - The Cloud Programming Language by Andija Sisko
Trivadis TechEvent 2016 Go - The Cloud Programming Language by Andija SiskoTrivadis
 
LISP: How I Learned To Stop Worrying And Love Parantheses
LISP: How I Learned To Stop Worrying And Love ParanthesesLISP: How I Learned To Stop Worrying And Love Parantheses
LISP: How I Learned To Stop Worrying And Love ParanthesesDominic Graefen
 

What's hot (20)

Parsers Combinators in Scala, Ilya @lambdamix Kliuchnikov
Parsers Combinators in Scala, Ilya @lambdamix KliuchnikovParsers Combinators in Scala, Ilya @lambdamix Kliuchnikov
Parsers Combinators in Scala, Ilya @lambdamix Kliuchnikov
 
Take advantage of C++ from Python
Take advantage of C++ from PythonTake advantage of C++ from Python
Take advantage of C++ from Python
 
Notes about moving from python to c++ py contw 2020
Notes about moving from python to c++ py contw 2020Notes about moving from python to c++ py contw 2020
Notes about moving from python to c++ py contw 2020
 
Java8
Java8Java8
Java8
 
Advance ROP Attacks
Advance ROP AttacksAdvance ROP Attacks
Advance ROP Attacks
 
Golang iran - tutorial go programming language - Preliminary
Golang iran - tutorial  go programming language - PreliminaryGolang iran - tutorial  go programming language - Preliminary
Golang iran - tutorial go programming language - Preliminary
 
Hadoop_Pennonsoft
Hadoop_PennonsoftHadoop_Pennonsoft
Hadoop_Pennonsoft
 
XPath - A practical guide
XPath - A practical guideXPath - A practical guide
XPath - A practical guide
 
Algorithm and Programming (Record)
Algorithm and Programming (Record)Algorithm and Programming (Record)
Algorithm and Programming (Record)
 
06 file processing
06 file processing06 file processing
06 file processing
 
FTD JVM Internals
FTD JVM InternalsFTD JVM Internals
FTD JVM Internals
 
Natural Language Toolkit (NLTK), Basics
Natural Language Toolkit (NLTK), Basics Natural Language Toolkit (NLTK), Basics
Natural Language Toolkit (NLTK), Basics
 
Go Lang Tutorial
Go Lang TutorialGo Lang Tutorial
Go Lang Tutorial
 
Functions
FunctionsFunctions
Functions
 
Lisp for Python Programmers
Lisp for Python ProgrammersLisp for Python Programmers
Lisp for Python Programmers
 
Apache Thrift
Apache ThriftApache Thrift
Apache Thrift
 
Re-engineering Eclipse MDT/OCL for Xtext
Re-engineering Eclipse MDT/OCL for XtextRe-engineering Eclipse MDT/OCL for Xtext
Re-engineering Eclipse MDT/OCL for Xtext
 
Trivadis TechEvent 2016 Go - The Cloud Programming Language by Andija Sisko
Trivadis TechEvent 2016 Go - The Cloud Programming Language by Andija SiskoTrivadis TechEvent 2016 Go - The Cloud Programming Language by Andija Sisko
Trivadis TechEvent 2016 Go - The Cloud Programming Language by Andija Sisko
 
Java Full Throttle
Java Full ThrottleJava Full Throttle
Java Full Throttle
 
LISP: How I Learned To Stop Worrying And Love Parantheses
LISP: How I Learned To Stop Worrying And Love ParanthesesLISP: How I Learned To Stop Worrying And Love Parantheses
LISP: How I Learned To Stop Worrying And Love Parantheses
 

Viewers also liked

Tutorial 37 API Coding
Tutorial 37 API CodingTutorial 37 API Coding
Tutorial 37 API CodingMax Kleiner
 
maXbox Blix the Programmer
maXbox Blix the ProgrammermaXbox Blix the Programmer
maXbox Blix the ProgrammerMax Kleiner
 
Arduino training program
Arduino training programArduino training program
Arduino training programMax Kleiner
 
Arduino LED maXbox starter18_3
Arduino LED maXbox starter18_3Arduino LED maXbox starter18_3
Arduino LED maXbox starter18_3Max Kleiner
 
Arduino Teaching Program
Arduino Teaching ProgramArduino Teaching Program
Arduino Teaching ProgramMax Kleiner
 

Viewers also liked (6)

Tutorial 37 API Coding
Tutorial 37 API CodingTutorial 37 API Coding
Tutorial 37 API Coding
 
maXbox Blix the Programmer
maXbox Blix the ProgrammermaXbox Blix the Programmer
maXbox Blix the Programmer
 
Arduino training program
Arduino training programArduino training program
Arduino training program
 
Arduino LED maXbox starter18_3
Arduino LED maXbox starter18_3Arduino LED maXbox starter18_3
Arduino LED maXbox starter18_3
 
Maxbox starter
Maxbox starterMaxbox starter
Maxbox starter
 
Arduino Teaching Program
Arduino Teaching ProgramArduino Teaching Program
Arduino Teaching Program
 

Similar to Best of Runtime Library

TI1220 Lecture 14: Domain-Specific Languages
TI1220 Lecture 14: Domain-Specific LanguagesTI1220 Lecture 14: Domain-Specific Languages
TI1220 Lecture 14: Domain-Specific LanguagesEelco Visser
 
The use of the code analysis library OpenC++: modifications, improvements, er...
The use of the code analysis library OpenC++: modifications, improvements, er...The use of the code analysis library OpenC++: modifications, improvements, er...
The use of the code analysis library OpenC++: modifications, improvements, er...PVS-Studio
 
Sour Pickles
Sour PicklesSour Pickles
Sour PicklesSensePost
 
220 runtime environments
220 runtime environments220 runtime environments
220 runtime environmentsJ'tong Atong
 
sphinx-i18n — The True Story
sphinx-i18n — The True Storysphinx-i18n — The True Story
sphinx-i18n — The True StoryRobert Lehmann
 
Building scalable and language-independent Java services using Apache Thrift ...
Building scalable and language-independent Java services using Apache Thrift ...Building scalable and language-independent Java services using Apache Thrift ...
Building scalable and language-independent Java services using Apache Thrift ...IndicThreads
 
Building scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftBuilding scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftTalentica Software
 
Erlang Message Passing Concurrency, For The Win
Erlang  Message  Passing  Concurrency,  For  The  WinErlang  Message  Passing  Concurrency,  For  The  Win
Erlang Message Passing Concurrency, For The Winl xf
 
What we can learn from Rebol?
What we can learn from Rebol?What we can learn from Rebol?
What we can learn from Rebol?lichtkind
 
Introduction to clojure
Introduction to clojureIntroduction to clojure
Introduction to clojureAbbas Raza
 
Introduction to source{d} Engine and source{d} Lookout
Introduction to source{d} Engine and source{d} Lookout Introduction to source{d} Engine and source{d} Lookout
Introduction to source{d} Engine and source{d} Lookout source{d}
 
Scala is java8.next()
Scala is java8.next()Scala is java8.next()
Scala is java8.next()daewon jeong
 
Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009Martin Odersky
 

Similar to Best of Runtime Library (20)

TI1220 Lecture 14: Domain-Specific Languages
TI1220 Lecture 14: Domain-Specific LanguagesTI1220 Lecture 14: Domain-Specific Languages
TI1220 Lecture 14: Domain-Specific Languages
 
The use of the code analysis library OpenC++: modifications, improvements, er...
The use of the code analysis library OpenC++: modifications, improvements, er...The use of the code analysis library OpenC++: modifications, improvements, er...
The use of the code analysis library OpenC++: modifications, improvements, er...
 
Sour Pickles
Sour PicklesSour Pickles
Sour Pickles
 
220 runtime environments
220 runtime environments220 runtime environments
220 runtime environments
 
python and perl
python and perlpython and perl
python and perl
 
Next .NET and C#
Next .NET and C#Next .NET and C#
Next .NET and C#
 
sphinx-i18n — The True Story
sphinx-i18n — The True Storysphinx-i18n — The True Story
sphinx-i18n — The True Story
 
Building scalable and language-independent Java services using Apache Thrift ...
Building scalable and language-independent Java services using Apache Thrift ...Building scalable and language-independent Java services using Apache Thrift ...
Building scalable and language-independent Java services using Apache Thrift ...
 
The Style of C++ 11
The Style of C++ 11The Style of C++ 11
The Style of C++ 11
 
Building scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftBuilding scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thrift
 
Erlang Message Passing Concurrency, For The Win
Erlang  Message  Passing  Concurrency,  For  The  WinErlang  Message  Passing  Concurrency,  For  The  Win
Erlang Message Passing Concurrency, For The Win
 
F# 101
F# 101F# 101
F# 101
 
What we can learn from Rebol?
What we can learn from Rebol?What we can learn from Rebol?
What we can learn from Rebol?
 
Processing XML with Java
Processing XML with JavaProcessing XML with Java
Processing XML with Java
 
Introduction to clojure
Introduction to clojureIntroduction to clojure
Introduction to clojure
 
Introduction to source{d} Engine and source{d} Lookout
Introduction to source{d} Engine and source{d} Lookout Introduction to source{d} Engine and source{d} Lookout
Introduction to source{d} Engine and source{d} Lookout
 
Scala is java8.next()
Scala is java8.next()Scala is java8.next()
Scala is java8.next()
 
Erlang, an overview
Erlang, an overviewErlang, an overview
Erlang, an overview
 
Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009
 
Python and You Series
Python and You SeriesPython and You Series
Python and You Series
 

More from Max Kleiner

EKON26_VCL4Python.pdf
EKON26_VCL4Python.pdfEKON26_VCL4Python.pdf
EKON26_VCL4Python.pdfMax Kleiner
 
EKON26_Open_API_Develop2Cloud.pdf
EKON26_Open_API_Develop2Cloud.pdfEKON26_Open_API_Develop2Cloud.pdf
EKON26_Open_API_Develop2Cloud.pdfMax Kleiner
 
maXbox_Starter91_SyntheticData_Implement
maXbox_Starter91_SyntheticData_ImplementmaXbox_Starter91_SyntheticData_Implement
maXbox_Starter91_SyntheticData_ImplementMax Kleiner
 
Ekon 25 Python4Delphi_MX475
Ekon 25 Python4Delphi_MX475Ekon 25 Python4Delphi_MX475
Ekon 25 Python4Delphi_MX475Max Kleiner
 
EKON 25 Python4Delphi_mX4
EKON 25 Python4Delphi_mX4EKON 25 Python4Delphi_mX4
EKON 25 Python4Delphi_mX4Max Kleiner
 
maXbox Starter87
maXbox Starter87maXbox Starter87
maXbox Starter87Max Kleiner
 
maXbox Starter78 PortablePixmap
maXbox Starter78 PortablePixmapmaXbox Starter78 PortablePixmap
maXbox Starter78 PortablePixmapMax Kleiner
 
maXbox starter75 object detection
maXbox starter75 object detectionmaXbox starter75 object detection
maXbox starter75 object detectionMax Kleiner
 
BASTA 2020 VS Code Data Visualisation
BASTA 2020 VS Code Data VisualisationBASTA 2020 VS Code Data Visualisation
BASTA 2020 VS Code Data VisualisationMax Kleiner
 
EKON 24 ML_community_edition
EKON 24 ML_community_editionEKON 24 ML_community_edition
EKON 24 ML_community_editionMax Kleiner
 
maxbox starter72 multilanguage coding
maxbox starter72 multilanguage codingmaxbox starter72 multilanguage coding
maxbox starter72 multilanguage codingMax Kleiner
 
EKON 23 Code_review_checklist
EKON 23 Code_review_checklistEKON 23 Code_review_checklist
EKON 23 Code_review_checklistMax Kleiner
 
EKON 12 Running OpenLDAP
EKON 12 Running OpenLDAP EKON 12 Running OpenLDAP
EKON 12 Running OpenLDAP Max Kleiner
 
EKON 12 Closures Coding
EKON 12 Closures CodingEKON 12 Closures Coding
EKON 12 Closures CodingMax Kleiner
 
NoGUI maXbox Starter70
NoGUI maXbox Starter70NoGUI maXbox Starter70
NoGUI maXbox Starter70Max Kleiner
 
maXbox starter69 Machine Learning VII
maXbox starter69 Machine Learning VIImaXbox starter69 Machine Learning VII
maXbox starter69 Machine Learning VIIMax Kleiner
 
maXbox starter68 machine learning VI
maXbox starter68 machine learning VImaXbox starter68 machine learning VI
maXbox starter68 machine learning VIMax Kleiner
 
maXbox starter67 machine learning V
maXbox starter67 machine learning VmaXbox starter67 machine learning V
maXbox starter67 machine learning VMax Kleiner
 
maXbox starter65 machinelearning3
maXbox starter65 machinelearning3maXbox starter65 machinelearning3
maXbox starter65 machinelearning3Max Kleiner
 
EKON22_Overview_Machinelearning_Diagrams
EKON22_Overview_Machinelearning_DiagramsEKON22_Overview_Machinelearning_Diagrams
EKON22_Overview_Machinelearning_DiagramsMax Kleiner
 

More from Max Kleiner (20)

EKON26_VCL4Python.pdf
EKON26_VCL4Python.pdfEKON26_VCL4Python.pdf
EKON26_VCL4Python.pdf
 
EKON26_Open_API_Develop2Cloud.pdf
EKON26_Open_API_Develop2Cloud.pdfEKON26_Open_API_Develop2Cloud.pdf
EKON26_Open_API_Develop2Cloud.pdf
 
maXbox_Starter91_SyntheticData_Implement
maXbox_Starter91_SyntheticData_ImplementmaXbox_Starter91_SyntheticData_Implement
maXbox_Starter91_SyntheticData_Implement
 
Ekon 25 Python4Delphi_MX475
Ekon 25 Python4Delphi_MX475Ekon 25 Python4Delphi_MX475
Ekon 25 Python4Delphi_MX475
 
EKON 25 Python4Delphi_mX4
EKON 25 Python4Delphi_mX4EKON 25 Python4Delphi_mX4
EKON 25 Python4Delphi_mX4
 
maXbox Starter87
maXbox Starter87maXbox Starter87
maXbox Starter87
 
maXbox Starter78 PortablePixmap
maXbox Starter78 PortablePixmapmaXbox Starter78 PortablePixmap
maXbox Starter78 PortablePixmap
 
maXbox starter75 object detection
maXbox starter75 object detectionmaXbox starter75 object detection
maXbox starter75 object detection
 
BASTA 2020 VS Code Data Visualisation
BASTA 2020 VS Code Data VisualisationBASTA 2020 VS Code Data Visualisation
BASTA 2020 VS Code Data Visualisation
 
EKON 24 ML_community_edition
EKON 24 ML_community_editionEKON 24 ML_community_edition
EKON 24 ML_community_edition
 
maxbox starter72 multilanguage coding
maxbox starter72 multilanguage codingmaxbox starter72 multilanguage coding
maxbox starter72 multilanguage coding
 
EKON 23 Code_review_checklist
EKON 23 Code_review_checklistEKON 23 Code_review_checklist
EKON 23 Code_review_checklist
 
EKON 12 Running OpenLDAP
EKON 12 Running OpenLDAP EKON 12 Running OpenLDAP
EKON 12 Running OpenLDAP
 
EKON 12 Closures Coding
EKON 12 Closures CodingEKON 12 Closures Coding
EKON 12 Closures Coding
 
NoGUI maXbox Starter70
NoGUI maXbox Starter70NoGUI maXbox Starter70
NoGUI maXbox Starter70
 
maXbox starter69 Machine Learning VII
maXbox starter69 Machine Learning VIImaXbox starter69 Machine Learning VII
maXbox starter69 Machine Learning VII
 
maXbox starter68 machine learning VI
maXbox starter68 machine learning VImaXbox starter68 machine learning VI
maXbox starter68 machine learning VI
 
maXbox starter67 machine learning V
maXbox starter67 machine learning VmaXbox starter67 machine learning V
maXbox starter67 machine learning V
 
maXbox starter65 machinelearning3
maXbox starter65 machinelearning3maXbox starter65 machinelearning3
maXbox starter65 machinelearning3
 
EKON22_Overview_Machinelearning_Diagrams
EKON22_Overview_Machinelearning_DiagramsEKON22_Overview_Machinelearning_Diagrams
EKON22_Overview_Machinelearning_Diagrams
 

Recently uploaded

Kolte Patil Mirabilis at Horamavu Road, Bangalore E brochure.pdf
Kolte Patil Mirabilis at Horamavu Road, Bangalore E brochure.pdfKolte Patil Mirabilis at Horamavu Road, Bangalore E brochure.pdf
Kolte Patil Mirabilis at Horamavu Road, Bangalore E brochure.pdfAhanundefined
 
Listing Turkey - Viva Perla Maltepe Catalog
Listing Turkey - Viva Perla Maltepe CatalogListing Turkey - Viva Perla Maltepe Catalog
Listing Turkey - Viva Perla Maltepe CatalogListing Turkey
 
Maha Mauka Squarefeet Brochure |Maha Mauka Squarefeet PDF Brochure|
Maha Mauka Squarefeet Brochure |Maha Mauka Squarefeet PDF Brochure|Maha Mauka Squarefeet Brochure |Maha Mauka Squarefeet PDF Brochure|
Maha Mauka Squarefeet Brochure |Maha Mauka Squarefeet PDF Brochure|AkshayJoshi575980
 
Kolte Patil Universe Hinjewadi Pune Brochure.pdf
Kolte Patil Universe Hinjewadi Pune Brochure.pdfKolte Patil Universe Hinjewadi Pune Brochure.pdf
Kolte Patil Universe Hinjewadi Pune Brochure.pdfPrachiRudram
 
Kohinoor Hinjewadi Phase 2 In Pune - PDF.pdf
Kohinoor Hinjewadi Phase 2 In Pune - PDF.pdfKohinoor Hinjewadi Phase 2 In Pune - PDF.pdf
Kohinoor Hinjewadi Phase 2 In Pune - PDF.pdfmonikasharma630
 
Provident Kenworth Rajendra Nagar Hyderabad.pdf
Provident Kenworth Rajendra Nagar Hyderabad.pdfProvident Kenworth Rajendra Nagar Hyderabad.pdf
Provident Kenworth Rajendra Nagar Hyderabad.pdfashiyadav24
 
What-are-the-latest-modular-wardrobe-designs.pdf
What-are-the-latest-modular-wardrobe-designs.pdfWhat-are-the-latest-modular-wardrobe-designs.pdf
What-are-the-latest-modular-wardrobe-designs.pdfKams Designer Zone
 
Purva Park Hill Kanakapura Road Bangalore.pdf
Purva Park Hill  Kanakapura Road Bangalore.pdfPurva Park Hill  Kanakapura Road Bangalore.pdf
Purva Park Hill Kanakapura Road Bangalore.pdfashiyadav24
 
It’s Time to Fight Back Against the Media Narrative Regarding Real Estate Com...
It’s Time to Fight Back Against the Media Narrative Regarding Real Estate Com...It’s Time to Fight Back Against the Media Narrative Regarding Real Estate Com...
It’s Time to Fight Back Against the Media Narrative Regarding Real Estate Com...Tom Blefko
 
LCAR Unit 22 - Leasing and Property Management - 14th Edition Revised.pptx
LCAR Unit 22 - Leasing and Property Management - 14th Edition Revised.pptxLCAR Unit 22 - Leasing and Property Management - 14th Edition Revised.pptx
LCAR Unit 22 - Leasing and Property Management - 14th Edition Revised.pptxTom Blefko
 
Mahindra Vista Kandivali East Mumbai Brochure.pdf
Mahindra Vista Kandivali East Mumbai Brochure.pdfMahindra Vista Kandivali East Mumbai Brochure.pdf
Mahindra Vista Kandivali East Mumbai Brochure.pdfPrachiRudram
 
Brigade Neopolis Kokapet, Hyderabad E- Brochure
Brigade Neopolis Kokapet, Hyderabad E- BrochureBrigade Neopolis Kokapet, Hyderabad E- Brochure
Brigade Neopolis Kokapet, Hyderabad E- Brochurefaheemali990101
 
Radiance Majestic Valasaravakkam Chennai.pdf
Radiance Majestic Valasaravakkam Chennai.pdfRadiance Majestic Valasaravakkam Chennai.pdf
Radiance Majestic Valasaravakkam Chennai.pdfashiyadav24
 
SVN Live 4.15.24 Weekly Property Broadcast
SVN Live 4.15.24 Weekly Property BroadcastSVN Live 4.15.24 Weekly Property Broadcast
SVN Live 4.15.24 Weekly Property BroadcastSVN International Corp.
 
LCAR RE Practice - The Pearson Vue State Exam
LCAR RE Practice - The Pearson Vue State ExamLCAR RE Practice - The Pearson Vue State Exam
LCAR RE Practice - The Pearson Vue State ExamTom Blefko
 
Anandtara Iris Residences Mundhwa Pune Brochure.pdf
Anandtara Iris Residences Mundhwa Pune Brochure.pdfAnandtara Iris Residences Mundhwa Pune Brochure.pdf
Anandtara Iris Residences Mundhwa Pune Brochure.pdfabbu831446
 
Provident Ecopolitan Aerospace Park, Bangalore E- Brochure.pdf
Provident Ecopolitan Aerospace Park, Bangalore E- Brochure.pdfProvident Ecopolitan Aerospace Park, Bangalore E- Brochure.pdf
Provident Ecopolitan Aerospace Park, Bangalore E- Brochure.pdffaheemali990101
 
LCAR RE Practice - The Power of Your Database
LCAR RE Practice - The Power of Your DatabaseLCAR RE Practice - The Power of Your Database
LCAR RE Practice - The Power of Your DatabaseTom Blefko
 
The Role of Mortgage Brokers in Retirement Housing: Key Considerations
The Role of Mortgage Brokers in Retirement Housing: Key ConsiderationsThe Role of Mortgage Brokers in Retirement Housing: Key Considerations
The Role of Mortgage Brokers in Retirement Housing: Key Considerationssunlite Mortgage
 
Clemson Engineering Consultant Dubai For Innovative and Sustainable Engineeri...
Clemson Engineering Consultant Dubai For Innovative and Sustainable Engineeri...Clemson Engineering Consultant Dubai For Innovative and Sustainable Engineeri...
Clemson Engineering Consultant Dubai For Innovative and Sustainable Engineeri...Clemson Engineering Consultant
 

Recently uploaded (20)

Kolte Patil Mirabilis at Horamavu Road, Bangalore E brochure.pdf
Kolte Patil Mirabilis at Horamavu Road, Bangalore E brochure.pdfKolte Patil Mirabilis at Horamavu Road, Bangalore E brochure.pdf
Kolte Patil Mirabilis at Horamavu Road, Bangalore E brochure.pdf
 
Listing Turkey - Viva Perla Maltepe Catalog
Listing Turkey - Viva Perla Maltepe CatalogListing Turkey - Viva Perla Maltepe Catalog
Listing Turkey - Viva Perla Maltepe Catalog
 
Maha Mauka Squarefeet Brochure |Maha Mauka Squarefeet PDF Brochure|
Maha Mauka Squarefeet Brochure |Maha Mauka Squarefeet PDF Brochure|Maha Mauka Squarefeet Brochure |Maha Mauka Squarefeet PDF Brochure|
Maha Mauka Squarefeet Brochure |Maha Mauka Squarefeet PDF Brochure|
 
Kolte Patil Universe Hinjewadi Pune Brochure.pdf
Kolte Patil Universe Hinjewadi Pune Brochure.pdfKolte Patil Universe Hinjewadi Pune Brochure.pdf
Kolte Patil Universe Hinjewadi Pune Brochure.pdf
 
Kohinoor Hinjewadi Phase 2 In Pune - PDF.pdf
Kohinoor Hinjewadi Phase 2 In Pune - PDF.pdfKohinoor Hinjewadi Phase 2 In Pune - PDF.pdf
Kohinoor Hinjewadi Phase 2 In Pune - PDF.pdf
 
Provident Kenworth Rajendra Nagar Hyderabad.pdf
Provident Kenworth Rajendra Nagar Hyderabad.pdfProvident Kenworth Rajendra Nagar Hyderabad.pdf
Provident Kenworth Rajendra Nagar Hyderabad.pdf
 
What-are-the-latest-modular-wardrobe-designs.pdf
What-are-the-latest-modular-wardrobe-designs.pdfWhat-are-the-latest-modular-wardrobe-designs.pdf
What-are-the-latest-modular-wardrobe-designs.pdf
 
Purva Park Hill Kanakapura Road Bangalore.pdf
Purva Park Hill  Kanakapura Road Bangalore.pdfPurva Park Hill  Kanakapura Road Bangalore.pdf
Purva Park Hill Kanakapura Road Bangalore.pdf
 
It’s Time to Fight Back Against the Media Narrative Regarding Real Estate Com...
It’s Time to Fight Back Against the Media Narrative Regarding Real Estate Com...It’s Time to Fight Back Against the Media Narrative Regarding Real Estate Com...
It’s Time to Fight Back Against the Media Narrative Regarding Real Estate Com...
 
LCAR Unit 22 - Leasing and Property Management - 14th Edition Revised.pptx
LCAR Unit 22 - Leasing and Property Management - 14th Edition Revised.pptxLCAR Unit 22 - Leasing and Property Management - 14th Edition Revised.pptx
LCAR Unit 22 - Leasing and Property Management - 14th Edition Revised.pptx
 
Mahindra Vista Kandivali East Mumbai Brochure.pdf
Mahindra Vista Kandivali East Mumbai Brochure.pdfMahindra Vista Kandivali East Mumbai Brochure.pdf
Mahindra Vista Kandivali East Mumbai Brochure.pdf
 
Brigade Neopolis Kokapet, Hyderabad E- Brochure
Brigade Neopolis Kokapet, Hyderabad E- BrochureBrigade Neopolis Kokapet, Hyderabad E- Brochure
Brigade Neopolis Kokapet, Hyderabad E- Brochure
 
Radiance Majestic Valasaravakkam Chennai.pdf
Radiance Majestic Valasaravakkam Chennai.pdfRadiance Majestic Valasaravakkam Chennai.pdf
Radiance Majestic Valasaravakkam Chennai.pdf
 
SVN Live 4.15.24 Weekly Property Broadcast
SVN Live 4.15.24 Weekly Property BroadcastSVN Live 4.15.24 Weekly Property Broadcast
SVN Live 4.15.24 Weekly Property Broadcast
 
LCAR RE Practice - The Pearson Vue State Exam
LCAR RE Practice - The Pearson Vue State ExamLCAR RE Practice - The Pearson Vue State Exam
LCAR RE Practice - The Pearson Vue State Exam
 
Anandtara Iris Residences Mundhwa Pune Brochure.pdf
Anandtara Iris Residences Mundhwa Pune Brochure.pdfAnandtara Iris Residences Mundhwa Pune Brochure.pdf
Anandtara Iris Residences Mundhwa Pune Brochure.pdf
 
Provident Ecopolitan Aerospace Park, Bangalore E- Brochure.pdf
Provident Ecopolitan Aerospace Park, Bangalore E- Brochure.pdfProvident Ecopolitan Aerospace Park, Bangalore E- Brochure.pdf
Provident Ecopolitan Aerospace Park, Bangalore E- Brochure.pdf
 
LCAR RE Practice - The Power of Your Database
LCAR RE Practice - The Power of Your DatabaseLCAR RE Practice - The Power of Your Database
LCAR RE Practice - The Power of Your Database
 
The Role of Mortgage Brokers in Retirement Housing: Key Considerations
The Role of Mortgage Brokers in Retirement Housing: Key ConsiderationsThe Role of Mortgage Brokers in Retirement Housing: Key Considerations
The Role of Mortgage Brokers in Retirement Housing: Key Considerations
 
Clemson Engineering Consultant Dubai For Innovative and Sustainable Engineeri...
Clemson Engineering Consultant Dubai For Innovative and Sustainable Engineeri...Clemson Engineering Consultant Dubai For Innovative and Sustainable Engineeri...
Clemson Engineering Consultant Dubai For Innovative and Sustainable Engineeri...
 

Best of Runtime Library

  • 1. Best of Runtime Library Inhalt Content Contenu Contenido Contenudo Sep. 2011 softwareschule.ch 1
  • 2. RTL is a Built In Delphi's Functions and Procedures Collection 1. Has a Version: const RTLVersion = 18.00; {(* You can use RTLVersion in $IF expressions to test the runtime library version level independently of the compiler version level. Example: {$IF RTLVersion >= 16.8} ... {$IFEND} *) 2. Routines are organised by Units: Classes, DateUtils, Dialogs, Math, Masks, FileCtrl, System, ShareMem, StrUtils, SysUtils, Types (check the Docu rtl manual fpc) 3. SysUtils is well documented! (RealTimeLib or RichTimeLib or RoutineTimeLib) Sep. 2011 softwareschule.ch 2
  • 3. RTL as Objects (Object Binding) 1. Name Conflicts Possible: Procedure ProcessPath(const EditText: string; var Drive: Char; var DirPart: string; var FilePart: string);'); //unit FileCtrl versus unit IdGlobal //or JCLMath.pas Objects are wrapped by Routines: function GrabLine2(const s: string; ALine: Integer): string; 2. var 3. sl: TStringList; 4. begin 5. sl:= TStringList.Create; 6. try 7. sl.LoadFromFile(s); 8. Result:= sl[ALine - 1]; // index off by one 9. finally 10. sl.Free; 11. end; 12. end; 2. unit Contnrs; is the Collection of Objects and his routines Sep. 2011 softwareschule.ch 3
  • 4. Objectives Topic Overview: Localizing RTL Categories Arithmetic routines Floating/Type conversions Business and finance routines Geometric routines Command line utilities Measurement conversion Character manipulation Numeric formatting routines Date/Time routines Ordinal routines Dialog and Message routines Pointer and address routines File/Text Management Random number routines File Name Utilities String handling routines Flow Control Routines String formatting routines Sep. 2011 softwareschule.ch 4
  • 5. RTL is platformindenpendent or at least begin {$IFDEF LINUX} dllhandle:= dlopen(PChar(s2), RTLD_LAZY); {$ELSE} dllhandle:= LoadLibrary(Pchar(s2)); {$ENDIF} if dllhandle = {$IFDEF LINUX} NIL {$ELSE} 0 {$ENDIF} then {$IFDEF LINUX} p.Ext1:= dlsym(dllhandle, pchar(copy(s, 1, pos(#0, s)-1))); {$ELSE} p.Ext1:= GetProcAddress(dllhandle, pchar(copy(s, 1, pos(#0, s)-1))); {$ENDIF} Sep. 2011 softwareschule.ch 5
  • 6. Best of I //You can test all Functions in one Script „165_best_of_runtime2.txt“: http://www.sourceforge.net/projects/maxbox //Function ABNFToText(const AText : String): String; //Indy unit IdGlobal //Function BytesToString(ABytes: TIdBytes; AStartIndex: Integer; AMaxCount: Integer): string; //Function ChangeFileExt(const FileName: string; const Extension: string): string); /SysUtils //Function CharToHexStr(Value: char): string); //Indy //Function CompareDateTime(const ADateTime1, ADateTime2 : TDateTime) : Integer; /DateUtils //Function CompareText(const S1: string; const S2: string): Integer); /SysUtils //Function TextIsSame(const A1: string; const A2: string): Boolean; /SysUtils //Function ContainsText(const AText, ASubText: string): Boolean; /StrUtils //Function CopyFileTo(const Source, Destination: string): Boolean; //Indy //Function CurrentProcessId: TIdPID; //Function CurrentThreadId: TIdPID; //Function DecodeDateFully(DateTime: TDateTime; var Year, Month, Day, DOW: Word): Boolean; //Function DomainName(const AHost: String): String; //Indy /SysUtils^ //Function DupeString(const AText: string; ACount: Integer) : string; /StrUtils //Function ExePath: string; //mXUtils Sep. 2011 softwareschule.ch 6
  • 7. Best of II //Function Fetch(var AInput: string; const ADelim: string; const ADelete: Boolean; const //Indy //Function FindCmdLineSwitch(Switch : string; IgnoreCase : Boolean): Boolean; /SysUtils //Function FloatToCurr(Value: Extended): Currency; /SysUtils //Function Format(const Format: string; const Args: array of const): string; /SysUtils //Function FutureValue(NPeriods:Integer; const Payment,PresentValue, FutureValue… /Math //Function GetClockValue: Int64; //Indy….. //Function GetTickCount: Cardinal; // 4294967296 ms are ~ 49,7 days //Function GetTickDiff(const AOldTickCount, ANewTickCount: Cardinal): Cardinal; //Function GetVersionString(FileName: string): string; //Jedi… //Function GetAssociatedProgram(const Extension:string; var Filename,Description:string): bool; //Function GetHostName: string; //Function HexStrToStr(Value: string): string; //Function IfThen(AValue: Boolean; const ATrue : string; AFalse: string): string; /Math //Function InputBox(const ACaption:string; const APrompt:string; /Dialogs //Function LoadStr(Ident: Integer): string; /SysUtils //Function Mean(const Data: array of Double): Extended; /Math… //_27 //Function StdDev(const Data: array of Double): Extended; //Procedure MeanAndStdDev(const Data: array of Double; var Mean, StdDev: Extended); Sep. 2011 softwareschule.ch 7
  • 8. Best of III //Function ProcessPath(const ABasePath:String; /FileCtrl, Dialogs… //Function PromptForFileName(var AFileName:string; const AFilter:string; const ADefaultExt: string;' const ATitle: string;const AInitialDir:string;SaveDialog: Boolean): Boolean); //Function ServicesFilePath: string; //Indy…Jedi //Function ShellExecute(hWnd: HWND; +Operation, FileName, Parameters,Directory: string); //Function SYDDepreciation(const Cost, Salvage: Extended; Life,Period: Integer): Extended; ! //Function StrHtmlDecode(const AStr : String): String; //Function StrHtmlEncode(const AStr : String): String; //Function DateTimeToInternetStr(now, true)) //Function LoadFileAsString( const FileName : string) : string'); //FileUtils Jedi //Procedure CreateFileFromString( const FileName, Data : string)'); //Procedure ShowFileProperties(const FileName: string); //Procedure GetConvTypes(const AFamily: TConvFamily; out ATypes: TConvTypeArray); //Procedure GetConvFamilies(out AFamilies: TConvFamilyArray); /ConvUtils function ReturnAddr: Pointer; asm MOV EAX,[EBP+4] end; Sep. 2011 softwareschule.ch 8
  • 9. Wishes Realised in the End… Binary streams manipulation with TBinaryReader and TBinaryWriter. * A regular expression library has been integrated into the Delphi RTL: o RegularExpressions + RegularExpressions.TRegEx is the main record for the user to match and replace with reg ex. The members of the RegEx unit make up an interface very close to the MSDN, except RegEx is implemented with records instead of classes, and therefore it does not use inheritance. o RegularExpressionsCore + RegularExpressionsCore.TPerlRegEx implements Perl-compatible regex. The RegExCore interface can be called directly, but is also the underlying base for the RegEx interface. * New file management extensions: o Added Support for Symbolic Links -- TSymLinkRec. o New functionalities for TPath, TDirectory, and TFile records. o A new Windows-specific method, TPath.GetHomePath, which returns the path to the application data folder. * Unicode support for strings stored on files. Sep. 2011 softwareschule.ch 9