Delphi 12 β版新增两个有用功能

目录

一、字符串长度允许超过255

二、新增多字符串功能

一、字符串长度允许超过255

        现在,字符串字面量的长度可以超过 255 个字符;换句话说,字符串字面量不再局限于经典的 Pascal ShortString 类型。注意字面字符串的长度仍可能受到编辑器的限制(每行 4K 字符)。
每行 4K 字符)。语法上并无变化;您只需使用字面字符串的长度超过 255 个字符。

上图 编辑器中长达 600 多个字符的字面字符串。

二、新增多字符串功能

该语言增加了对多行字符串的支持。多行字符串由三重引号(''')和新行引入,可产生多行源代码,并以不含任何文本的一行中的三重引号(''')结束。请注意,在第一行的三引号之外添加文本是无效的。重要的是,不需要用行连接成带有 + 号的单行字符串。

上图 编辑器中的多行字面字符串

再例如:

const
 str1 = 'ABC'; // single line string
 str2 = ''; // empty string
 str3 = ''''
 ; // not a multiline string. It contains #$22
 strML1 = '''
 The quick brown fox jumps
 over the lazy dog.
 '''; // multiline string
 strHTML = '''
 <UL>
 <LI>Item 1</LI>
 
Copyright © 2023 Embarcadero Technologies, Inc. | Embarcadero Confidential/NDA
 <LI>Item 2</LI>
 <LI>Item 3</LI>
 <LI>Item 4</LI>
 </UL>
 ''';
 strJSON = '''
 [
 {"id" : "1", "name" : "Large"},
 {"id" : "2", "name" : "Medium"},
 {"id" : "2", "name" : "Small"}
 ]
 ''';
 strSQL= '''
 SELECT *
 FROM Customers
 WHERE Department = 'R&D'
 ORDER BY Name;
 ''';
 // The string below is invalid: there is text before the new line
 strInvalidString= '''SELECT *
 FROM Customers
 WHERE Department = 'R&D'
 ORDER BY Name;
 ''';

将多行文本从外部应用程序粘贴到 RAD Studio 编辑器时,编辑器中粘贴多行文本时,请记住可能会有一些特殊的非可见字符、控制字符、特定换行组合或不常见的 Unicode 字符需要粘贴。这些字符可能会混淆编辑器。
 

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
SUIPack is a suite of real WYSIWYG VCL skin components for Delphi & C++Builder. It provides you the ability to create professionally-UI-designed skin and implementations for your applications. Besides the alternative for standard controls, SUIPack provides more additional controls(E.g. non-rectangular forms, MSN-style popup window, etc.). You will never spend many time on programming skin support. SUIPack provides more than 60 controls. Place them on a form, then you can see the skinned appearance immediately even at design time. SUIPack has 5 built-in skins and it supports to load outside skin files. It's real What You See Is What You Get! SUIPack fully supports Sunisoft Skin Solutions v2 now. It means that you can use all skins of Skin Solutions v2. The professionally-UI-designed skins are mostly designed by our UI artists. Please note, we not only provide the UI controls, but also UI design! You also can create your own skins with the brand new SkinBuilder tool. Key features ------------- * 60+ components * 5 built-in skins * Dozens of professionally-UI-designed official skins from UI artists and a lot of third-party skins * Supports to build the skin files into the EXE file * What you see(design-time) is what you get(run-time) * Provides stable converting tool to transfer your existing project smoothly * Provides SkinBuilder tool to create your own skins, with it which supports to load VisualStyle(*.msstyles) files, you can own thousands of skins now! * Supports to create non-rectangular forms and controls * Support MSN-Style popup window * MDI forms supported * DB-Aware components with theme's support * Without requiring any DLL or OCX With SUIPack We have over 2,000 customers who are using Sunisoft Skin Solutions v2 around world. The products below are developed with SUIPack by some of our customers.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

海纳老吴

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值