Package erjang

Examples of erjang.EString.stringValue()


        }
      }
    }   

    try {
      BigInteger val = new BigInteger(seq.stringValue());
      return ERT.box(val);
     
    } catch (NumberFormatException e) {
      throw ERT.badarg(obj);
    }
View Full Code Here


  public static EDouble list_to_float(EObject obj) {
    EString seq;
    if ((seq = obj.testString()) == null)
      throw ERT.badarg(obj);
   
    String string = seq.stringValue();
    if (string.length() == 0
      || string.charAt(0) == '.'
      || string.charAt(string.length()-1) == '.'
      || string.indexOf('.') == -1) {
      throw ERT.badarg(obj);
View Full Code Here

  @BIF
 
  static public EAtom list_to_atom(EObject obj) {
    EString es;
    if ((es = obj.testString()) != null) {
      return EAtom.intern(es.stringValue());
    }
    throw ERT.badarg(obj);
  }

  @BIF
View Full Code Here

  public static EObject load_nif(EObject path, EObject info)
  {
    EString str = path.testString();
    if (str == null) { throw ERT.badarg(path, info); }
   
    NIF nif = NIF.load(str.stringValue() + ".so", info);
    if (nif == null) {
      return new ETuple2(ERT.am_error,
            new ETuple2(am_load_failed, ERT.am_undefined)
          );
    } else {
View Full Code Here

  @Override
  public void visitCompile(EAtom att, EObject value) {
    EString string;
    if (att == am_source && (string = value.testString()) != null) {
      source = string.stringValue();
    }
    compile_info = compile_info.cons(ETuple2.make(att, value));
  }

  String source() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.