惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

W
WeLiveSecurity
博客园 - 【当耐特】
Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学
Stack Overflow Blog
Stack Overflow Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
IT之家
IT之家
Cloudbric
Cloudbric
The Register - Security
The Register - Security
小众软件
小众软件
PCI Perspectives
PCI Perspectives
G
Google Developers Blog
AI
AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Google DeepMind News
Google DeepMind News
Google DeepMind News
Google DeepMind News
宝玉的分享
宝玉的分享
Recent Commits to openclaw:main
Recent Commits to openclaw:main
量子位
TaoSecurity Blog
TaoSecurity Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
F
Full Disclosure
N
Netflix TechBlog - Medium
博客园_首页
Last Week in AI
Last Week in AI
A
Arctic Wolf
B
Blog RSS Feed
J
Java Code Geeks
C
Cybersecurity and Infrastructure Security Agency CISA
I
InfoQ
aimingoo的专栏
aimingoo的专栏
云风的 BLOG
云风的 BLOG
NISL@THU
NISL@THU
MyScale Blog
MyScale Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Jina AI
Jina AI
有赞技术团队
有赞技术团队
S
Schneier on Security
L
Lohrmann on Cybersecurity
P
Privacy & Cybersecurity Law Blog
T
Threat Research - Cisco Blogs
P
Palo Alto Networks Blog
S
Security @ Cisco Blogs
Security Archives - TechRepublic
Security Archives - TechRepublic
Security Latest
Security Latest
Vercel News
Vercel News
博客园 - 司徒正美
Webroot Blog
Webroot Blog
Hacker News: Ask HN
Hacker News: Ask HN
A
About on SuperTechFans

博客园 - 云水浮萍

结构体和类中属性定义需要static地方 群里人问的消息切换分页问题,我就标记一下 AnsiString类型定义的时候可以直接指定代码页,比如950繁体字,936日文 CopyMemory Move使用笔记 System.Length 函数 Delphi Helper Record Class 向量定义笔记 关于日期与字符串转换时出错的分隔符,小记一下容易忘记 类型与泛型标记 http://docwiki.embarcadero.com/RADStudio/XE7/en/Delphi_Data_Types Delphi中GUID相等检查中经典指针应用 test是否被执行? 每次看到某个数据结构的时候,有两个指针,一个起始,一个结束,一直没想明白为何是起始与结束,不是起始加数量,是怎么操作的? 给自己一个书单 pureMVC学习之一 泛型与无聊 队列与DelphiXe新语法 猫儿山之行计划书 一个错误,一个教训,关于堆栈平衡 - 云水浮萍 - 博客园
十万个为什么收集
云水浮萍 · 2015-04-18 · via 博客园 - 云水浮萍

1、类型常量是什么?与常量、变量有什么区别?

const x=5; //常量

{$J+}//允许对变量赋值

const y:Integer=5;//类型常量

{$J-}

  Delphi7下@x查看地址会提示:Variable required

               @y则正常

浪费好多时间,没测试完全,下面全是猜的,x做为资源编译进exe,每次启动地址是固定的 y只是一个变量存在,根据申明位置(全局或过程内)确定了生存周期,它是在栈上的

使用{$J+}可修改这种常量,其实单例模式就这么干的。另外xe7我记得可以申明 class var 不知道有没有class const,有空的时候再来测试,先标记一下。