CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
不看会后悔的Windows XP之经验谈 简单快捷DIY实用家庭影院
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  Delphi >  VCL组件开发及应用

别见笑,一个菜问题.

楼主lizhenjia(暴雪)2001-12-06 20:39:17 在 Delphi / VCL组件开发及应用 提问

在delphi中$是什么意思?如:  
        const   java=$400000  
        $400000啥意思?  
  问题点数:20、回复次数:3Top

1 楼dancemaple(枫之舞)回复于 2001-12-06 20:43:02 得分 5

美圆:)  
  开个玩笑  
   
  是十六进制Top

2 楼3fly(三飞)回复于 2001-12-06 20:56:17 得分 5

没错$123   =   1   *   (16   *   16)   +   2   *   16   +   3Top

3 楼NetFair(2006,成功转型!从事市场工作!坚持技术市场两手抓,两手都要硬方针!)回复于 2001-12-06 21:00:28 得分 10

he   built-in   assembler   supports   two   types   of   constant:   numeric   constants   and   string   constants.  
   
  Numeric   constants  
   
  Numeric   constants   must   be   integers,   and   their   values   must   be   between   ?,147,483,648   and   4,294,967,295.  
  By   default,   numeric   constants   use   decimal   notation,   but   the   built-in   assembler   also   supports   binary,   octal,   and   hexadecimal.   Binary   notation   is   selected   by   writing   a   B   after   the   number,   octal   notation   by   writing   an   O   after   the   number,   and   hexadecimal   notation   by   writing   an   H   after   the   number   or   a   $   before   the   number.  
  Numeric   constants   must   start   with   one   of   the   digits   0   through   9   or   the   $   character.   When   you   write   a   hexadecimal   constant   using   the   H   suffix,   an   extra   zero   is   required   in   front   of   the   number   if   the   first   significant   digit   is   one   of   the   digits   A   through   F.   For   example,   0BAD4H   and   $BAD4   are   hexadecimal   constants,   but   BAD4H   is   an   identifier   because   it   starts   with   a   letter.  
   
  String   constants  
   
  String   constants   must   be   enclosed   in   single   or   double   quotation   marks.   Two   consecutive   quotation   marks   of   the   same   type   as   the   enclosing   quotation   marks   count   as   only   one   character.   Here   are   some   examples   of   string   constants:  
   
  'Z'  
   
  'Delphi'  
  "That's   all   folks"  
  '"That''s   all   folks,"   he   said.'  
  '100'  
  '"'  
  "'"  
   
  String   constants   of   any   length   are   allowed   in   DB   directives,   and   cause   allocation   of   a   sequence   of   bytes   containing   the   ASCII   values   of   the   characters   in   the   string.   In   all   other   cases,   a   string   constant   can   be   no   longer   than   four   characters   and   denotes   a   numeric   value   which   can   participate   in   an   expression.   The   numeric   value   of   a   string   constant   is   calculated   as  
   
  Ord(Ch1)   +   Ord(Ch2)   shl   8   +   Ord(Ch3)   shl   16   +   Ord(Ch4)   shl   24  
   
  where   Ch1   is   the   rightmost   (last)   character   and   Ch4   is   the   leftmost   (first)   character.   If   the   string   is   shorter   than   four   characters,   the   leftmost   characters   are   assumed   to   be   zero.   The   following   table   shows   string   constants   and   their   numeric   values.  
   
  String Value  
  'a' 00000061H  
  'ba' 00006261H  
  'cba' 00636261H  
  'dcba' 64636261H  
  'a   ' 00006120H  
  '       a' 20202061H  
  'a'   *   2 000000E2H  
  'a'-'A' 00000020H  
  not   'a' FFFFFF9EHTop

相关问题

  • 别见笑,菜鸟问题,请留意。
  • 我是菜鸟,问题嗷嗷滥别见笑!在先等!
  • 很菜的问题,请大家别见笑,并请帮忙
  • 菜鸟求助(问题简单) 望高手们别见笑
  • 小菜问题(见笑)
  • 菜鸟问题,见笑了!
  • 问题太嫩,别见笑!
  • 迷茫....(大家别见笑!)
  • 问大家一个绝对很菜的问题,我是新人,别见笑。
  • 关于存储过程的菜鸟问题(刚看的书,别见笑!)

关键词

  • constant
  • notation
  • hexadecimal
  • numeric
  • digits
  • number
  • write

得分解答快速导航

  • 帖主:lizhenjia
  • dancemaple
  • 3fly
  • NetFair

相关链接

  • Delphi类图书
  • Delphi类源码下载
  • Delphi控件下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo