Search
Results 181 to 200 for string formatting.
- Windows Programming Tips
MaxTime: TDateTime): boolean; begin Sleep(1); Result : Now < MaxTime; end; var MaxTime: TDateTime; LockFileName: string; begin inherited Create; LockFileName : IncludeTrailingPathDelimiter(GetTempDir) + AName + '.tmp'; MaxTime : IncMillisecond(Now, WaitForMSec); repeat if FileExists ... TForm1.MemoryClick(Sender: TObject); Var Memory: TMemoryStatus; begin InfoMemo.Text : ''; Memory.dwLength : SizeOf(Memory); GlobalMemoryStatus(Memory); InfoMemo.Lines.Add(Format('Memory total: %f GB', Memory.dwTotalPhys /1024 /1024 /1024 )); InfoMemo.Lines.Add(Format('Memory free: %f GB', Memory.dwAvailPhys
- MacOS Monterey changes for developers
Symbols now support layered symbol images. Layered symbol images use an updated data format to annotate each path element of the symbol with a level in a hierarchy: primary, secondary ... defaultEnablement< /key> < true/> < key>version< /key> < real>1< /real> < key>requiredOnboarding< /key> < array> < string>Tap< /string> < string>Arrow Swipe< /string> < string>Scroll Drag< /string> < string>Tilt< /string> < string>Trackpad Capture
- Using the printer
HEADLINE 'I Printed My Very First Text On '; var YPos, LineHeight, VerticalMargin: Integer; SuccessString: String; begin with Printer do try BeginDoc; Canvas.Font.Name : 'Courier New'; Canvas.Font.Size : 10; Canvas.Font.Color : clBlack; LineHeight : Round ... basic text output in the bold line, it also provides an example of formatting your text. From begin to end; the following happens: - With Printer.BeginDoc you start printing - however, nothing
- Equal
usually do not use the equal sign comparison in conjunction with IEEE 754 formats floating-point numbers . Instead one uses math.compareValue (https://www.freepascal.org/docs-html/rtl/math/comparevalue.html). comparitive remarks Unlike other programming languages ... your Variable variable declarations: pascal program initializedVariable(input, output, stderr); var i: longint; response: string 'Wrong!'; begin writeLn('What''s the answer?'); readLn(i); if i 42 then begin response
- MacOS Audio Recorder
AVAudioRecorder does not understand then it will wrap the file in Core Audio Format container. So, see to it that the extension and the AVFormatIDKey match. Example Code :::note ... TForm1; MyAudioRecorder : AVAudioRecorder Nil; implementation $R .lfm ... // Convert NSStrings function function NSStringToString(ns: NSString): String; var pathStr: shortstring; begin CFStringGetPascalString(CFStringRef(ns),@pathStr,255,CFStringGetSystemEncoding()); Result : pathStr; end; // Record audio
- Varlen Encoding
more likely to contain small values, such as those used for sequential indices and string lengths, but whose upper limit may be the size of a LongWord or a QWord ... Varlen Encoding is an attempt to reduce this wastage with minimal performance impact. Format A Varlen-encoded integer (henceforth just called a Varlen ) takes between 1 and 9 bytes
- Configuration file
processed first. Format One command line option is written per line with the same format as when used on the command line. Comments Comment lines are allowed. They follow ... location to find files named in subsequent INCLUDE directives. - \ SECTION - \ WRITE - print a string Directives that are equivalent to Free Pascal source code compiler directives. For example, DEFINE
- Web Service Toolkit
UserService)),ATransport + 'address ' + locAdr); End; function TUserService_Proxy.GetList():TUserArray; Var locSerializer : IFormatterClient; locCallContext : ICallContext; locStrPrmName : string; Begin locCallContext : Self as ICallContext; locSerializer : GetSerializer(); Try locSerializer.BeginCall('GetList', GetTarget(),locCallContext); locSerializer.EndCall(); MakeCall(); locSerializer.BeginCallRead ... User Service Sample',sLineBreak); if (items.Length 0) then WriteLn(' No user found.') else WriteLn(Format(' %d user(s) found : ', items.Length )); for i : 0 to items.Length - 1 do begin item : items
- Web Service Toolkit/ru
UserService)),ATransport + 'address ' + locAdr); End; function TUserService_Proxy.GetList():TUserArray; Var locSerializer : IFormatterClient; locCallContext : ICallContext; locStrPrmName : string; Begin locCallContext : Self as ICallContext; locSerializer : GetSerializer(); Try locSerializer.BeginCall('GetList', GetTarget(),locCallContext); locSerializer.EndCall(); MakeCall(); locSerializer.BeginCallRead ... User Service Sample',sLineBreak); if (items.Length 0) then WriteLn(' No user found.') else WriteLn(Format(' %d user(s) found : ', items.Length )); for i : 0 to items.Length - 1 do begin item : items
- How To Use TFPExpressionParser
property AsFloat (or AsDateTime etc. accordingly): pascal var FParser: TFPExpressionParser; argument: TFPExprIdentifierDef; s: string; x: integer; f: double; begin s: ''; FParser : TFPExpressionParser.Create(nil); try // Enable the use of mathematical expressions ... function argument value f : FParser.Evaluate.ResFloat; // Calculate the function value s : s + format('x %d : %g ' + LineEnding, x,f ); // Demo output to display the result end; // Show the result ShowMessage
- Issues 3.0.0
only data on ARMHF (< http://bugs.freepascal.org/view.php?id 28448 c85939> ) 8. 31774: change default debug format for Darwin/i386 from Stabs to DWARF2, because Xcode 7 no longer supports Stabs (and DWARF2 ... syntax mode to a mode without \ $modeswtich systemcodepage 11. 31847: make sure that "string" in \ $h+ mode and "ansistring" refer to the same type 12. 31848: fix test on systems
- DWARF
Debugger_Setup for information which setting to use. ::: :::: Missing dwarf-style debugging-data-format will result in a message: :img src "/_files/Enable_Dwarf_2_prompt.png" .floatleft The Debugger Status page has as overview ... depending on the version of DWARF used. This comprises: - dynamic arrays - short and long strings - TObjects - variants Especially the info for Long/ShortString may affect how different debugger backends display those
- Lazarus 0.9.26 release notes
changed and new added to work with utf8 file and directory names. - Some useful string operations (UTF8Copy, UTF8UpperCase, UTF8LowerCase to name a few) are added to the LCLProc unit ... class). - graphics which loaded from a file or resource represented internally in the origianl format (depth, component order, etc). And only when OS handles needs to be created it converts
- GDB Debugger Tips
Stabs - tr - td Dwarf (GDB and LLDB) - td Dwarf 2 (-gw) This sets the format to Dwarf2. This is the most basic dwarf setting. Dwarf 2 with sets (-gw -godwarfsets ... Dwarf 3 (-gw3) Dwarf 3 can encode additional info for some types (such as strings and arrays). It also preserves the case of identifiers in the debug info. However there
- Cnocstream
calling ObjectToJSONString with the description-tag, it is possible to choose the used format (description). Modifying the behaviour using descriptions There are more ways to modify the behaviour ... This is done as follows: $M+ uses csModel, csJSONRttiStreamHelper; type TMyType class private FName: string; FDescription: string; FCamelCase: Integer; published property Name: string read FName write FName; property Description: string
- Accessing macOS System Information
registry_entry_t): kern_return_t; cdecl; external; function get_platform_serial_num: string; var ioRegistryRoot :io_registry_entry_t; serialnumCf :CFStringRef; l :integer; begin ioRegistryRoot : IORegistryEntryFromPath(kIOMasterPortDefault, 'IOService:/'); serialnumCf ... Identifier) is a 16-byte long number. It is normally expressed in a standard format of characters representing hexadecimal digits. UUIDs were formerly known as Globally Unique Identifiers (GUIDs
- Lazarus 3.0 release notes
line of the main program begin/end. LazDebuggerFpLldb (default on MacOS) - Added Mem-Limits (and String,Pchar,Array) to the debugger config > See < https://wiki.freepascal.org/LazDebuggerFp> (MaxMemReadSize, MaxStringLen, MaxArrayLen, MaxNullStringSearchLen) > > Limiting ... Messages window can open the source. See Lazarus Delphi Compiler Tool Jedi Code Format - Some improvements in code formatting. - The jcf command line tool is now a text-mode application
- IDE Window: IDE Options - Debugger Value-Formatter
types: - TDateTime - TDate - TTime This means it is possible to set up a different format for a TTime that for some reason has a date part, and a TDateTime which ... consider Convert_Ordinal_to_name . Alpha Color As TColor, but for TAlphaColor CharArray as string For data type Array of char Array n..m of char Displays the data
- Custom Drawn Interface/Android/ru
baseline, which is the bottom of strings like "abc", but not the bottom of strings like "qg". See < http://code.google.com/p/android/issues/detail?id 393> - There is no documentation about what the size ... text gets quite beaultiful. - It can draw on the ARGB 32-bits non-premultiplied format which is a pretty good one Flood of garbage collector messages when the caret
- Extending the IDE
custom code here end; constructor TEdX.Create(theComponent: TComponent); begin inherited Create(theComponent); FNewStrProp: 'new string property value'; FNewIntProp: 99; end; end. Writing components Main article: How To Write Lazarus Component ... component an icon for the component palette Create an image file of the format .bmp, .xpm or .png with the same name as the component class. For example tmybutton.png