Beispiel #1
0
int main() {
    People *p = PeopleInit(ObjectCreate(People),20);
    p->sayHello();
    ObjectDelete(p);

    return 0;
}
Beispiel #2
0
//-----------------------------------------------------------------------------------------------
int deinit()
{

   if (DEBUG == 1)
   {
      // Close debug file
      FileClose (file_handle);
      Print (file_name," was closed.");
   }

   ObjectDelete("X-Axis");

   return(0);
}
Beispiel #3
0
int LocalObjectDelete(void)
{
	int	rval;

	rval = ObjectDelete();

	if (Cur_object_index != -1) {
		Cur_goody_type = Objects[Cur_object_index].contains_type;
		Cur_goody_id = Objects[Cur_object_index].contains_id;
		Cur_goody_count = Objects[Cur_object_index].contains_count;
	}

	set_view_target_from_segment(Cursegp);

	return rval;
}
Beispiel #4
0
static int LocalObjectDelete(void)
{
	int	rval;

	rval = ObjectDelete();

	if (Cur_object_index != object_none) {
		const auto &&objp = vcobjptr(Cur_object_index);
		Cur_goody_type = objp->contains_type;
		Cur_goody_id = objp->contains_id;
		Cur_goody_count = objp->contains_count;
	}

	set_view_target_from_segment(Cursegp);

	return rval;
}
Beispiel #5
0
static void ContextDelete(Context* ctx) {
  if(!ctx) {
    return;
  }

  Object* current = ctx->lastObject;
  while(current) {
    Object* next = current->next;
    ObjectDelete(ctx, current);
    free(current);
    current = next;
  }

  EnvironmentDelete(ctx->environment);
  StackDelete(ctx->stack);
  ReaderDelete(ctx->reader);
  free(ctx);
}
Beispiel #6
0
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
{
    IndicatorBuffers(7);
//---- drawing settings
    SetIndexStyle(0,DRAW_SECTION);
//---- indicator buffers mapping
    SetIndexBuffer(0,MasterIndicator);
    SetIndexBuffer(1,SNN_Indicator);
    SetIndexBuffer(2,ZigzagBuffer);
    SetIndexBuffer(3,HighMapBuffer);
    SetIndexBuffer(4,LowMapBuffer);
    SetIndexBuffer(5,CompraE_S1);
    SetIndexBuffer(6,VentaE_S1);

    SetIndexEmptyValue(0,0.0);
    SetIndexEmptyValue(1,0.0);
    SetIndexEmptyValue(2,0.0);
    SetIndexEmptyValue(5,0.0);
    SetIndexEmptyValue(6,0.0);
//---- indicator short name
    IndicatorShortName("H5PHET - Master Trainer 2 ("+pipsTPSL+","+maxDias+","+numDias+")");
//---- initialization done
   PrimeraVez=0; // Para que se ejecute solo una vez después de la inicialización.


// agregado por H
    // new label object
    ObjectDelete("label_object2");
    if(!ObjectCreate("label_object2", OBJ_LABEL, 0, 0, 0))
    {
        Print("error: cant create label_object! code #",GetLastError());
        return(0);
    }
    ObjectSet("label_object2", OBJPROP_XDISTANCE, 250);
    ObjectSet("label_object2", OBJPROP_YDISTANCE, 0);
    ObjectSetText("label_object2", "H5PHET - Master Trainer 2", 10, "Times New Roman", Green);
    caso1=0;
    caso2=0;
    caso3_1=0;
    caso3_2=0;
    maxMinutos=maxDias*1440;
    return(0);
}