rtime.cpp

来自「eC++编译器源码」· C++ 代码 · 共 39 行

CPP
39
字号
#pragma main
#include <SYSTEM.h>
#include <RType.h>
#include <RTuple.h>
#include <RInterpret.h>
#include <Date.h>
#include <stdio.h>

const unsigned int TTIME = 15;

unsigned int declarer(ADDRESS context, unsigned int reqWidth)
{
  return sizeof(Date)*2;
};

void invoke(unsigned int method, pStack ps)
{
  
};

boolean inoutr(ADDRESS context, unsigned int method, pTuple p,
   unsigned int index, unsigned int width,
   WORD & value[])
{  Date *pd;  unsigned int position;  pTuple pc;
  pc = ADR(value);
  pd = ADDRESS(p)+LONG(index);
  position = 0;
  return Read(*pc, position, *pd);
  printf("method=%u", method);
  printf("index=%u", index);
  printf(" width=%u\n", width);
  return false;
};

void main(void)
{
  Register("time", "Rtime", TTIME, declarer, invoke, inoutr);
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?