public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Mark Knecht <markknecht@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] [OT] - Code translation tools?
Date: Mon, 24 Jan 2011 14:34:00 -0800	[thread overview]
Message-ID: <AANLkTikZWkqv4WjNKXESHufkS_MB7F3_UHPio5kETrP8@mail.gmail.com> (raw)

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;



             reply	other threads:[~2011-01-24 22:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-24 22:34 Mark Knecht [this message]
2011-01-25  0:35 ` [gentoo-user] Re: [OT] - Code translation tools? 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTikZWkqv4WjNKXESHufkS_MB7F3_UHPio5kETrP8@mail.gmail.com \
    --to=markknecht@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox