コード例 #1
0
ファイル: debug-print.c プロジェクト: h2oota/opendylan
enum dylan_type_enum
dylan_type (D instance) {
  if ((DUMINT)instance & 3) {
    if ((DUMINT)instance & 1)
      return(integer_type);
    else if ((DUMINT)instance & 2)
      return(character_type);
    else
      return(unknown_type);
  } else { /* dylan pointer */
    if (float_p(instance))
      return(float_type);
    else if (boolean_p(instance))
      return(dylan_boolean_type);
    else if (string_p(instance))
      return(string_type);
    else if (vector_p(instance))
      return(vector_type);
    else if (pair_p(instance))
      return(pair_type);
    else if (empty_list_p(instance))
      return(empty_list_type);
    else if (symbol_p(instance))
      return(symbol_type);
    else if (simple_condition_p(instance))
      return(simple_condition_type);
    else if (class_p(instance))
      return(class_type);
    else if (function_p(instance))
      return(function_type);
    else
      return(user_defined_type);
  }
}
コード例 #2
0
ファイル: raw.hpp プロジェクト: rlk/rawk
 double get(int i, int j, int k) const
 {
     return double(swap(*float_p(data(i, j, k))));
 }
コード例 #3
0
ファイル: raw.hpp プロジェクト: rlk/rawk
 void put(int i, int j, int k, double d)
 {
     *float_p(data(i, j, k)) = swap(float(d));
 }