Chain Code of Delphi

Source: Internet
Author: User
With a series of helper, Delphi can also use the chain CodeNow.
// For example, to extract 3.1415926 from 141 into an integer: var num: integer; begin num: = pi. tostring (). split (['. ']) [1]. substring (0, 3 ). tointeger (); // input. remember to use Ctrl + space to prompt the code showmessage (Num. tostring (); // 141end;

I'm writing something similar to the following:ProgramStart to use:

{The program requires extracting A: B :... the following text goes to the specified variable: A: qwertyuiopb: wertyuiopac: ertyuiopasqwertyuiopasdd: rtyuiopasd ...} uses system. character; // 2) and STR [2]. isinarray ([':']) then begin case STR [1] of 'A': A: = Str. substring (2 ). trim; // The chained code 'B': B: = STR is used here. substring (2 ). trim; 'C': C: = Str. substring (2 ). trim; 'D': D: = Str. substring (2 ). trim; end; List. free; showmessagefmt ('% s; % s', [a, B, c, d]); end;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.