Search

Results 101 to 120 for string formatting.

  1. How to write in-memory database applications in Lazarus/FPC

    Rewrite(myTextFile); s : ''; //initialize empty string try //write field names (as column headers) for i : 0 to DataSet.Fields.Count - 1 do begin s : s + Format('%s,', DataSet.Fields i .FieldName ); end; Writeln ... begin //Numerical fields without quotes, string fields with quotes if ((DataSet.FieldDefs i .DataType ftInteger) or (DataSet.FieldDefs i .DataType ftFloat)) then s : s + Format('%s,', DataSet.Fields i .AsString ) else

  2. SizeOf

    writeLn(format(enteredN, length(f) )); writeLn(format(totalData, length(f) sizeOf(f 0 ) )); end. The approach is the same for Ansistring ANSI strings (depending on the $longstrings compiler switch state

  3. MacOS NSRegularExpression

    characters, we rearrange them. Our search string is different this time and represents a contact list. We are going to rearrange the format from Firstname, Lastname to the more sensible

  4. XML Tutorial

    based way to store information as opposed to storing the information in a binary format. Modern data interchange languages such as XHTML, as well as most WebServices technologies, are based ... line unless you like the formatting) : pascal procedure XML2Tree(XMLDoc:TXMLDocument; TreeView:TTreeView); // Local function that outputs all node attributes as a string function GetNodeAttributesAsString(pNode: TDOMNode):string

  5. Fcl-image

    AFileName, Reader); // ... Converting between two raster image formats To convert simply open in one format and save in the desired one, like in this example: pascal uses fpreadgif, fpimage, fpwritebmp ... uses clause for all file formats requested): pascal uses ... fpImage, fpReadJpeg, fpReadBMP, fpReadPNG, fpReadGIF, fpReadPCX, fpReadTIFF, fpReadTGA; function GetImageSize(const AFileName: String; out ASize: TPoint): Boolean; var stream: TStream; readerClass

  6. Fpvectorial

    partners.adobe.com/public/developer/en/ps/PLRM.pdf> LAS LAS is geospatial data encoded in the ASPRS LASer (LAS) file format, which exists in versions 1.0, 1.1, 1.2, 1.3 and 1.4. Version 2.0 does not yet exist ... just like the name says are strings drawn with fonts. Entities are things like circles, arcs, ellipses, rotated ellipses, etc. Usage examples Format conversion This example loads a PDF, converts

  7. Developing with Graphics

    formats for TPicture With the following function you can get a list of all file extensions which TPicture.LoadFromFile can read: pascal uses sysutils,Graphics; function getExtensions_TPicture_LoadFromFile: string; returns ... procedure SaveToPng(const bmp: TBitmap; PngFileName: String); var png : TPortableNetworkGraphic; begin png : TPortableNetworkGraphic.Create; try png.Assign(bmp); png.SaveToFile(PngFileName); finally png.Free; end; end; Pixel Formats TColor The internal pixel format

  8. Synapse - Email Examples

    Port is in parameter in format like: 'localhost.somewhere.com:25'. HR_Connect: Written : 0; :report count of bytes writed to socket. Number is in parameter string. If you need is in integer

  9. The parse tree

    string, this field indicates the string type. CallParaN Field Description ---------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------- Is_Colon_Para : Boolean; Used for internal routines which can use optional format parameters (using colons). Is set to TRUE ... Description ----------------------- ----------------------------------------------------------- AssignTyp: TAssignTyp; Currently unused (Used to be used for C-like assigns) Concat_String: Boolean; Currently unused (use for optimizations in future versions) LoadN Field Description --------------------- ----------------------------------------------------------------------------------------------------------------------------- SymTableEntry: PSym; Symbol

  10. LGenerics

    MessagePack data format (unit LgMsgPack) - MessagePack serialization/deserialization of native Pascal data structures using RTTI (unit lgPdo) - Free Pascal port of Unishox2, a C library for compressing short strings (unit lgUnishox ... exporting Pascal data structures to JSON format and vice versa. The following types are currently supported (called PDOs for short): - numeric, boolean or string types, some limited support of variants

  11. Pas2js

    same as the FPC command-line arguments. Error messages are also in the same format. The compiler needs access to all sources, and so you need to specify the path ... with all the used resource strings in your program. The above example was generated using the command: pas2js -Jrprogram trs1.pp -B Note that the format is different from the format

  12. RichMemo

    Cocoa Rtf delphi property Rtf: String :img src "/_files/RtfEditor.PNG" width 400 .floatright Read/Write property that allows to read or write Rich-Text Formatted (RTF) text to the whole control ... would work in run-time as well. If then property value is an empty string then Lines property is used as a plain text to initialize control value in load

  13. KControls/KMemo notes

    then Data.Write(s 1 ,length(s)); end; procedure TForm1.PrimaryPaste(SelIndex : integer); var Buff : string; begin if PrimarySelection.HasFormat(CF_TEXT) then begin // I don't know if this is useful ... AText: TKString) that gets the string 'converted' above. At line 4099 there is - pascal if (Ansi < > '') and (Ansi < > 0) then begin S : AnsiString(Format('%s\''%.2x', S, Ord(Ansi

  14. Using Python in Lazarus on Windows/Linux

    array of string); var Str: string; i: Integer; begin Str: ''; for i: 0 to Length(Dirs)-1 do Str: Str + 'r"' + Dirs i + '"' + ','; Str: Format('sys.path %s ', Str ); GetPythonEngine.ExecString ... memoConsole.Lines.Add(Data); end; - edConsole.OnKeyPress: pascal procedure TfmMain.edConsoleKeyPress(Sender: TObject; var Key: char); var Str: string; begin if Key 13 then begin Str: edConsole.Text; //support entering " some

  15. Using Python in Lazarus on Windows/Linux/ru

    array of string); var Str: string; i: Integer; begin Str: ''; for i: 0 to Length(Dirs)-1 do Str: Str + 'r"' + Dirs i + '"' + ','; Str: Format('sys.path %s ', Str ); GetPythonEngine.ExecString ... memoConsole.Lines.Add(Data); end; - edConsole.OnKeyPress: pascal procedure TfmMain.edConsoleKeyPress(Sender: TObject; var Key: char); var Str: string; begin if Key 13 then begin Str: edConsole.Text; //support entering " some

  16. Local compiler directives

    that checks the sanity of string variables and arguments. Historical Following directives were recognized in earlier versions of FPC and are now illegal: - $output_format determined the output format

  17. Fcl-web

    descendent. Each variable will be in a separate line in the TStrings in the format variablename value, similarly to how they are shown in the browser page address. To search ... Handled: Boolean); var HexText, AsciiText: string; begin HexText : ARequest.QueryFields.Values 'hex' ; AsciiText : HexToAnsii(HexText); AResponse.ContentType : 'text/html;charset utf-8'; AResponse.Contents.LoadFromFile(ExtractFilePath(ParamStr(0)) + 'mainpage.html'); AResponse.Contents.Text : Format(AResponse.Contents.Text, HexText, AsciiText ); Handled : True

  18. Comparison of approaches for rounding to an integer

    real; fmt : string; begin r1 : 1.3; r2 : 1.6; r3 : 3.5; r4 : 4.5; fmt : '%10s%10s%10s%10s%10s%10s%10s'; WriteLn(format(fmt, 'Value','Write:x:0','Trunc','Round','ISO7185

  19. ExCtrls

    sencfCurrMinusVal : currency string first, no space, '-' at value (e.g. '$-1') - sencfCurrValMinus : currency string first, value with appended '-' (eg. '$1-') - etc... Other allowed values are sencfParValCurrPar ('1$'), sencfMinusValCurr ('-1$'), sencfValMinusCurr ... gradient when DrawStyle pdsGradient - Caption: String - custom text to be displayed in the center of the progress bar. The text is passed to the Format() function and thus can contain

  20. Fcl-web/ru

    HTTP POST). Простое решение для первой проблемы - просто использовать стандартную подпрограмму Паскаля Format с добавлением %s или %d в файл HTML в соответствующие места, которые получат настраиваемое значение. Чтение данных ... Handled: Boolean); var HexText, AsciiText: string; begin HexText : ARequest.QueryFields.Values 'hex' ; AsciiText : HexToAnsii(HexText); AResponse.ContentType : 'text/html;charset utf-8'; AResponse.Contents.LoadFromFile(ExtractFilePath(ParamStr(0)) + 'mainpage.html'); AResponse.Contents.Text : Format(AResponse.Contents.Text, HexText, AsciiText ); Handled : True