This is a port of the mruby/c tutorial Chapter 03 to the mbed environment.

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

symbol.h File Reference

symbol.h File Reference

Symbol. More...

Go to the source code of this file.

Functions

mrb_sym add_sym (const char *str)
mrb_sym str_to_symid (const char *str)
const char * symid_to_str (mrb_sym sym_id)

Detailed Description

Symbol.

  Copyright (C) 2015-2016 Kyushu Institute of Technology.
  Copyright (C) 2015-2016 Shimane IT Open-Innovation Center.
  This file is distributed under BSD 3-Clause License.
  

Definition in file symbol.h.


Function Documentation

mrb_sym add_sym ( const char *  str )

Add symbol to symbol table.

Parameters:
strTarget string.
Returns:
mrb_sym Symbol value.
Return values:
-1If error occurred.

Definition at line 56 of file symbol.c.

mrb_sym str_to_symid ( const char *  str )

Convert string to symbol value.

Parameters:
strTarget string.
Returns:
mrb_sym Symbol value.

Definition at line 93 of file symbol.c.

const char* symid_to_str ( mrb_sym  sym_id )

Convert symbol value to string.

Parameters:
mrb_symSymbol value.
Returns:
const char* String.
Return values:
NULLInvalid sym_id was given.

Definition at line 116 of file symbol.c.