LoginSignup
0
1

More than 5 years have passed since last update.

C++ Builder XE4, 10.2 Tokyo > BoolToStr(True) > -1を返す / BoolToStr(False) > 0を返す

Last updated at Posted at 2017-04-24
動作環境
C++ Builder XE4
RAD Studio 10.2 Tokyo Update 2 (追記: 2017/12/28)
Unit1.cpp
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
    : TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
    String msg19 = BoolToStr(True);
    OutputDebugString(msg19.c_str());

    String msg22 = BoolToStr(False);
    OutputDebugString(msg22.c_str());

}
//---------------------------------------------------------------------------
結果
デバッグ出力: -1 プロセス Project1.exe (3568)
デバッグ出力: 0 プロセス Project1.exe (3568)

Trueを-1としている処理系があったと思ったが、C++ Builder (Delphi)でのことだった。

0
1
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1