Gentoo Archives: gentoo-user

From: Mark Knecht <markknecht@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] [OT] - Code translation tools?
Date: Mon, 24 Jan 2011 22:36:25
Message-Id: AANLkTikZWkqv4WjNKXESHufkS_MB7F3_UHPio5kETrP8@mail.gmail.com
1 Hello,
2 I'm wondering if there are any generic sorts of code translation
3 tools in portage wherein I could translate from an 'uncommon' language
4 no one here is likely to use (EasyLanguage) into C?
5
6 As an example I've attached a little EL function that takes
7 buy/sell command data an puts it away in an array for safe keeping.
8 What tools are out there, if any, that might allow me to describe how
9 EL works and then the tool does the conversion?
10
11 Thanks,
12 Mark
13
14
15 Inputs:
16 Array1[A1,AA1](NumericArrayRef),
17 EType(StringSimple),
18 EQty(NumericSimple),
19 ESPrice(NumericSimple),
20 ELPrice(NumericSimple),
21 MyDate(NumericSimple),
22 MyTime(NumericSimple)
23 ;
24
25 Switch (EType)
26 Begin
27 Case "Buy": Value1 = 1;
28 Case "Sell": Value1 = 2;
29 Case "SellShort": Value1 = 3;
30 Case "BuyToCover": Value1 = 4;
31 End
32 ;
33
34 If ((EQty >= 1) and (ESPrice = 0) and (ELPrice = 0)) then //Implies Market order
35 Begin
36 Array1[Value1,1] = Value1-1;
37 Array1[Value1,2] = EQty;
38 Array1[Value1,7] = MyDate;
39 Array1[Value1,8] = MyTime;
40 End
41 else if ((EQty >= 1) and (ESPrice > 0) and (ELPrice = 0)) then
42 //Implies Stop order
43 Begin
44 Array1[Value1,1] = Value1-1;
45 Array1[Value1,3] = EQty;
46 Array1[Value1,4] = ESPrice;
47 Array1[Value1,7] = MyDate;
48 Array1[Value1,8] = MyTime;
49 End
50 else if ((EQty >= 1) and (ESPrice = 0) and (ELPrice > 0)) then
51 //Implies Limit order
52 Begin
53 Array1[Value1,1] = Value1-1;
54 Array1[Value1,5] = EQty;
55 Array1[Value1,6] = ELPrice;
56 Array1[Value1,7] = MyDate;
57 Array1[Value1,8] = MyTime;
58 End
59 ;
60
61 MWK.ADE_SaveSysTraderTrades3_ = 0;

Replies

Subject Author
[gentoo-user] Re: [OT] - Code translation tools? walt <w41ter@×××××.com>
Re: [gentoo-user] [OT] - Code translation tools? Michael Orlitzky <michael@××××××××.com>