Examples of Fun


Examples of net.sf.kpex.prolog.Fun

        IO.println("no");
        break;
      }
      if (Names instanceof Fun)
      {
        Fun NamedR = (Fun) R.numberVars();
        for (int j = 0; j < Names.getArity(); j++)
        {
          IO.println(((Fun) Names).getArg(j) + "=" + NamedR.getArg(j));
        }
        // IO.println(";");
        if (!moreAnswers(i))
        {
          E.stop();
View Full Code Here

Examples of net.sf.kpex.prolog.Fun

class FunToken extends Fun
{
  public FunToken(String s)
  {
    super("funToken", new Fun(s));
  }
View Full Code Here

Examples of net.sf.kpex.prolog.Fun

   */
  @Override
  public int exec(Prog p)
  {
    int i = getIntArg(0);
    Fun F = (Fun) getArg(1);
    Term A = i == 0 ? new Const(F.getName()) : i == -1 ? new Int(F.getArity()) : F.args[i - 1];
    return putArg(2, A, p);
  }
View Full Code Here

Examples of net.sf.kpex.prolog.Fun

    String mes = e.getMessage();
    if (null == mes)
    {
      mes = "unknown_error";
    }
    Fun f = new Fun("error", new Const(type), new Const(mes), new Fun("line", new Int(line)));
    Clause C = new Clause(f, Const.TRUE);
    if (verbose)
    {
      IO.errmes(type + " error at line:" + line);
      IO.errmes(C.prettyPrint(), e);
View Full Code Here

Examples of net.sf.kpex.prolog.Fun

    {
      t = getList();
    }
    else if (n instanceof FunToken)
    {
      Fun f = (Fun) t;
      f.args = getArgs();
      t = builtins.toBuiltin(f);
    }
    else
    {
View Full Code Here

Examples of net.sf.kpex.prolog.Fun

      g.setColor(color);
    }
    Enumeration E = V.elements();
    while (E.hasMoreElements())
    {
      Fun T = (Fun) E.nextElement();
      IO.mes("drawing: " + T);
      int x = T.getIntArg(0);
      int y = T.getIntArg(1);
      int dx = T.getIntArg(2);
      int dy = T.getIntArg(3);
      g.fill3DRect(x, y, dx, dy, true);
    }
  }
View Full Code Here

Examples of net.sf.kpex.prolog.Fun

    {
      T = p.getBuiltins().toBuiltin(new Const(s));
    }
    else
    {
      Fun F = new Fun(s);
      F.init(i);
      T = p.getBuiltins().toBuiltin(F);
    }
    return putArg(2, T, p);
  }
View Full Code Here

Examples of net.sf.kpex.prolog.Fun

  public static LayoutManager to_layout(Term L)
  {
    LayoutManager M = null;
    if (L instanceof Fun)
    {
      Fun F = (Fun) L;
      int x = (int) ((Int) F.getArg(0)).getValue();
      int y = (int) ((Int) F.getArg(1)).getValue();
      M = new GridLayout(x, y, 5, 5);
    }
    else
    {
      String m = ((Const) L).getName();
View Full Code Here

Examples of net.sf.kpex.prolog.Fun

   */
  @Override
  public int exec(Prog p)
  {
    JinniCanvas C = (JinniCanvas) ((JavaObject) getArg(0)).toObject();
    Fun D = (Fun) getArg(1);
    C.to_draw(D);
    return 1;
  }
View Full Code Here

Examples of net.sf.kpex.prolog.Fun

    {
      X = Const.NO;
    }
    else
    {
      X = new Fun("the", X);
    }
    return putArg(1, X, p);
  }
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.