2025-04-05

VEX no include

例えば、VEX 用の foo.h というファイルを作り、この中に

float thrice (float a) {return a * 3;} /* 入力の3倍を返す */
という関数を作ったとする。この関数を Attribute Wrangle で使うには
  1. foo.h を ~/houdini20.5/vex/include/ に格納し、
  2. Attribute Wrangle では、
    #include "foo.h"
      
    @val = thrice (100.0);
    などとするが、
ここでは、自分で書いた関数をあたかもビルトイン関数のように、#include 無しで使う方法を紹介する。