精品偷拍一区二区三区,亚洲精品永久 码,亚洲综合日韩精品欧美国产,亚洲国产日韩a在线亚洲

  • <center id="usuqs"></center>
  • 
    
  • Delphi中if c then 與if c=true then 的區(qū)別?

    Delphi中if c then 與if c=true then 的區(qū)別?
    procedure Tform1.button1click(sender:Tobject);
    var t:boolean;
    begin
    if t then edit1.text :='t=true'
    else if not t then edit1.text := 't=false'
    else edit1.text := '111';//結(jié)果返回TRUE
    end;
    procedure Tform1.button2click(sender:Tobject);
    var t:boolean;
    begin
    if t=true then edit1.text :='true'
    else if t=false then edit1.text := 'false'
    else edit1.text := '111';//結(jié)果返回111
    end;
    為什么返回的結(jié)果不同?
    其他人氣:675 ℃時間:2020-04-16 04:47:22
    優(yōu)質(zhì)解答
    在沒對t 賦值時,系統(tǒng)默認(rèn)為true
    在button1的if中是判斷t是否為真,而button2的if中是判斷t是否等于true(是有對t已經(jīng)賦值了),所以在button2中系統(tǒng)只執(zhí)行else edit1.text := '111'

    希望我的回答對你有幫助,愿早日解開你的疑惑!
    我來回答
    類似推薦
    請使用1024x768 IE6.0或更高版本瀏覽器瀏覽本站點(diǎn),以保證最佳閱讀效果。本頁提供作業(yè)小助手,一起搜作業(yè)以及作業(yè)好幫手最新版!
    版權(quán)所有 CopyRight © 2012-2024 作業(yè)小助手 All Rights Reserved. 手機(jī)版