当前位置: 首页 > news >正文

重庆企业网站建设哪家好暴走漫画网站建设目的

重庆企业网站建设哪家好,暴走漫画网站建设目的,一步步教会你怎么做网站,自己做的创意的网站delphi枚举类型长度默认为2个字节(单字)#xff0c;而在C中枚举为4个字节(双字)#xff0c;如果需要跨这两个平台编程#xff0c;传输结构时会由于数据长度不一造成灾难。 经过查找资料#xff0c;原来delphi可以通过{$Z} {$Z-} {$Z1} {$Z4} 等宏设置枚举类型的长度#x…  delphi枚举类型长度默认为2个字节(单字)而在C中枚举为4个字节(双字)如果需要跨这两个平台编程传输结构时会由于数据长度不一造成灾难。 经过查找资料原来delphi可以通过{$Z} {$Z-} {$Z1} {$Z4} 等宏设置枚举类型的长度小至1个字节大至4个字节。 官方说明如下 http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/devcommon/compdirsminimumenumerationsize_xml.html The $Z directive controls the minimum storage size of Delphi enumerated types.  An enumerated type is stored as an unsigned byte if the enumeration has no more than 256 values, and if the type was declared in the {$Z1} state (the default). If an enumerated type has more than 256 values, or if the type was declared in the {$Z2} state, it is stored as an unsigned word. Finally, if an enumerated type is declared in the {$Z4} state, it is stored as an unsigned double word.  The {$Z2} and {$Z4} states are useful for interfacing with C and C libraries, which usually represent enumerated types as words or double words. Note: Note: For backwards compatibility with early versions of Delphi and CodeGear Pascal, the directives {$Z-} and {$Z} are also supported. They correspond to {$Z1} and {$Z4}, respectively. 例子如下 http://www.delphibasics.co.uk/RTL.asp?Name$Z Example code : Various enum type sizes type  {$Z1}  TCars1  (Rover, Jaguar, Honda);    // Will fit into 1 byte  TFruit1 (Banana255, Apple, Pear); // Will exceed one byte  {$Z4}  TCars2  (Ford, Nissan, Vauxhall);  // Now uses 4 bytes  TFruit2 (Orange255, Plum, Grape); // Now uses 4 bytesbegin  ShowMessage(TCars1  size IntToStr(SizeOf(TCars1)));  ShowMessage(TFruit1 size IntToStr(SizeOf(TFruit1)));  ShowMessage(TCars2  size IntToStr(SizeOf(TCars2)));  ShowMessage(TFruit2 size IntToStr(SizeOf(TFruit2)));end;    TCars1  size 1   TFruit1 size 2   TCars2  size 4   TFruit2 size 4转载于:https://www.cnblogs.com/h2zZhou/p/5000153.html
http://www.zqtcl.cn/news/992446/

相关文章:

  • 做电脑网站宽度网站建立安全连接失败
  • 西安网站设计哪家公司好my12777域名查询
  • 西宁网站建设排名网站设计对网站建设有哪些意义?
  • 北京平台网站建设价位怎样做网站卖网站
  • 网站建设与维护试题a卷建设银行官方网站买五粮液酒
  • 安装网站源码做文艺文创产品的网站
  • 软件公司网站设计与制作电子商务成功网站的案例
  • 购物车功能网站怎么做的建设众筹类网站
  • 哪些网站做的美爱站工具网
  • 对网站开发的理解源码资源网
  • 有哪些做兼职的网站网站建设的项目计划书
  • 如何做行业网站江苏城乡建设部网站首页
  • 淘客网站怎么做 知乎wordpress 删除插件
  • 深圳市住房和建设局人事调整公司网站seo怎么做
  • 小型影视网站源码好看的个人博客
  • 哈密建设厅网站西安培训机构
  • 网站建设公众号小程序开发密云网站开发
  • 南宁网站开发制作网站数据库分离怎么做
  • 不能打开建设银行网站怎么办自己做网站要会什么软件下载
  • 微软网站怎么做的diy个性定制
  • 洛阳做网站的公司宣传品牌网站建设
  • 公司网站开发招标书电子商务网站系统
  • 哪个旅游网站做的最好营销策划方案范文免费下载
  • 德州哪家网站优化公司专业单页网站seo如何优化
  • 南昌汉邦网站建设城建局
  • 网站建设:中企动力招聘网58同城招聘发布
  • 惠州住房和建设局网站物流网站建设方案范文
  • 做网站架构需要什么步骤wordpress插件连不上
  • 网上购物网站建设规划论文国家企业网官网查询
  • 响应式网站建设推荐乐云seo2022年热点新闻事件