public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] [OT] - Code translation tools?
@ 2011-01-24 22:34 Mark Knecht
  2011-01-25  0:35 ` [gentoo-user] " walt
  2011-01-26  1:15 ` [gentoo-user] " Michael Orlitzky
  0 siblings, 2 replies; 9+ messages in thread
From: Mark Knecht @ 2011-01-24 22:34 UTC (permalink / raw
  To: gentoo-user

Hello,
   I'm wondering if there are any generic sorts of code translation
tools in portage wherein I could translate from an 'uncommon' language
no one here is likely to use (EasyLanguage) into C?

   As an example I've attached a little EL function that takes
buy/sell command data an puts it away in an array for safe keeping.
What tools are out there, if any, that might allow me to describe how
EL works and then the tool does the conversion?

Thanks,
Mark


Inputs:
Array1[A1,AA1](NumericArrayRef),
EType(StringSimple),
EQty(NumericSimple),
ESPrice(NumericSimple),
ELPrice(NumericSimple),
MyDate(NumericSimple),
MyTime(NumericSimple)
;

Switch (EType)
	Begin
		Case "Buy":			Value1 = 1;
		Case "Sell":		Value1 = 2;
		Case "SellShort":	Value1 = 3;
		Case "BuyToCover":	Value1 = 4;
	End
;

If ((EQty >= 1) and (ESPrice = 0) and (ELPrice = 0)) then //Implies Market order
	Begin
		Array1[Value1,1] = Value1-1;
		Array1[Value1,2] = EQty;
		Array1[Value1,7] = MyDate;
		Array1[Value1,8] = MyTime;		
	End
else if ((EQty >= 1) and (ESPrice > 0) and (ELPrice = 0)) then
//Implies Stop order
	Begin
		Array1[Value1,1] = Value1-1;
		Array1[Value1,3] = EQty;
		Array1[Value1,4] = ESPrice;
		Array1[Value1,7] = MyDate;
		Array1[Value1,8] = MyTime;
	End
else if ((EQty >= 1) and (ESPrice = 0) and (ELPrice > 0)) then
//Implies Limit order
	Begin
		Array1[Value1,1] = Value1-1;
		Array1[Value1,5] = EQty;
		Array1[Value1,6] = ELPrice;
		Array1[Value1,7] = MyDate;
		Array1[Value1,8] = MyTime;
	End	
;

MWK.ADE_SaveSysTraderTrades3_ = 0;



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-01-26 21:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-24 22:34 [gentoo-user] [OT] - Code translation tools? Mark Knecht
2011-01-25  0:35 ` [gentoo-user] " walt
2011-01-25  1:15   ` Mark Knecht
2011-01-26  1:15 ` [gentoo-user] " Michael Orlitzky
2011-01-26 17:56   ` Mark Knecht
2011-01-26 18:47     ` Michael Orlitzky
2011-01-26 19:40       ` Mark Knecht
2011-01-26 20:32         ` Michael Orlitzky
2011-01-26 21:54           ` Mark Knecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox