houdini vex header tips

avoid errors when header is included multiple times

always first line of your header:

#pragma once

or using

#ifndef __MY_HEADERNAME__
#define __MY_HEADERNAME__
// code here
#endif

function like define

#define print(v) printf("%g",v)

then using print instead of printf("%g",v)

using macro to create function which accepting different type argument

#pragma once

#define FUNCfoo(type)\
function void foo( const type val) {\
    printf("%g\n",val);\
}\

FUNCfoo(int)
FUNCfoo(float)

referenced document and article