LoginSignup
1
1

More than 5 years have passed since last update.

C++、VB.NET、InterSystems ObjectScriptの文法翻訳

Last updated at Posted at 2018-08-25

「まったく同じ処理を行う」方法がわかれば、ObjectScriptでの記述も楽になると思い、作りました。InterSystems飯島さんのチェック済みです。(ありがたい)
20180828-4.PNG
20180828-5.PNG

追記:
yumetodoさんのコメントをいただきまして、コードを検証しました。(確かにoperator +は""の和には使えず、動きませんでした。その他、大文字小文字の別など、いろいろありました。ご親切にご指摘ありがとうございます。Visual Studio 2015/Visual C++のコンソールアプリケーションにて以下のコードで動作確認しました。なお、飯島様にはObjectScriptのチェックを行っていただいており、C++部分は私の書き間違いです。)

test.cpp
// ConsoleApplication1.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//

#include "stdafx.h"
#include <cstdio>
#include <string>

class ClsBase
{

};

class test1 : public ClsBase
{
public:
    std::string outstring(std::string filename)
    {
      return filename + std::string("a") + std::string("b");
    }

};


int main(void)
{
    test1 t;
    std::string s;
    std::string s1 = "testcode";
    s = t.outstring(s1);
    printf("%s", s.c_str());
    system("pause");
    return 0;
}
1
1
8

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
1
1