Skip to content

Comment on Cello – Higher Level Programming in Cparent

Comments

Converting a C value to a Cello value is easy.

  int cValue = 5;  // because I randomly feel like that's a good number
  var celloValue = $(Int, cValue);  // I'm pretty sure this works, but I haven't proven it
Coming back from Cello to C, it appears that you can do this:
  long anotherCValue = as_long(celloValue);
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.