PureBytes Links
Trading Reference Links
|
Hmm ... the message I posted first did not go through - but this one
did. Anyway here is the code I was referring to:
function Greg2Jul( d, m, y )
{
/*var y = parseFloat(cd2jdform.yearf.value)
var m = parseFloat(cd2jdform.monthf.value)
var d = parseFloat(cd2jdform.dayf.value)
var uh = parseFloat(cd2jdform.uthf.value)
var um = parseFloat(cd2jdform.utmf.value)
var us = parseFloat(cd2jdform.utsf.value)*/
uh=12;
um=0;
us=0;
extra = 100.0*y + m - 190002.5;
rjd = 367.0*y;
//rjd -= floor(7.0*(y+floor((m+9.0)/12.0))/4.0);
rjd = rjd - floor(7.0*(y+floor((m+9.0)/12.0))/4.0);
//rjd += floor(275.0*m/9.0);
rjd = rjd + floor(275.0*m/9.0);
//rjd += d;
rjd = rjd + d;
//rjd += (uh + (um + us/60.0)/60.)/24.0;
rjd = rjd + (uh + (um + us/60.0)/60.)/24.0;
//rjd += 1721013.5;
rjd = rjd + 1721013.5;
//rjd -= 0.5*extra/abs(extra);
rjd = rjd - 0.5*extra/abs(extra);
//rjd += 0.5;*/
rjd = rjd + 0.5;
return rjd;
}
Filter=C>0; AddColumn(Greg2Jul(Day(),Month(),Year()),"Javascript");
AddColumn(Greg2Jul(Day(),Month(),Year())%7+1,"Day");
Regards,
Peter
-----Original Message-----
From: bluesinvestor [mailto:investor@xxxxxxxxxxxxx]
Sent: Wednesday, April 30, 2003 2:17 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] Re: Motr loop questions
Peter (this could get confusing),
> There is another short hand writing:
>
> x += y means x = x + y
> x -= y means x = x - y
See my prior post ... Amibroker does not use this short hand yet.
Regards,
Peter
-----Original Message-----
From: uenal.mutlu@xxxxxxxxxxx [mailto:uenal.mutlu@xxxxxxxxxxx]
Sent: Wednesday, April 30, 2003 12:07 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Re: Motr loop questions
Hi Peter,
the latter two forms in your posting should be IMHO not correct.
Otherwise negation of a variable, fe. -myvar) would
not function. Please see TJ's postings on that.
As Tomasz wrote, the increment and decrement operators
are alternative shorthand writings. Here is a summary:
x = --i means i = i - 1; x = i
x = ++i means i = i + 1; x = i
x = i-- means x = i; i = i - 1
x = i++ means x = i; i = i + 1
There is another short hand writing:
x += y means x = x + y
x -= y means x = x - y
It is not a must to use these shorthand writings; one
should use the variant which one likes most.
UM
----- Original Message -----
From: "amiabilityy" <amiabilityy@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Wednesday, April 30, 2003 5:27 PM
Subject: [amibroker] Re: Motr loop questions
The ++ operator is used to express incrementing directly rather than
the more long winded and equally correct i += 1 or i = i + 1
There are two forms of the increrment
(and 2 corresponding forms of the decrement)
i++ post-increment.
++i pre- increment.
i- post-decrement.
-i pre-decrement.
These are expresions that return a value
The post increment form returns the value of i after it has been
incremented, while the pre increment form returns the value before i
was incremented.
Note: i am not sure if ami can use the decrement forms.
Peter.
--- In amibroker@xxxxxxxxxxxxxxx, "IVA GmbH" <funnybiz@xxxx> wrote:
> Hello,
>
> I´d appreciate if someone ould clarify the following "loop
questions":
>
> 1./ Where in the AFL code can those loops if/else and why/for be
embedded? Just anywhere, where they´re needed?
>
> 2./ Can we have nested loops?
>
> 3./ In case of severeal loops in my code, can I use any letter
instead of the "i" for the iteration part so that AFL doesn´t get
mixed up?
>
> 4./ What is the difference between "i++" and "++i". I saw it in one
of -I believe- TJ´s posts.
>
> Many thanks
>
> Markus
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make Money Online Auctions! Make $500.00 or We Will Give You Thirty Dollars for Trying!
http://us.click.yahoo.com/KXUxcA/fNtFAA/AG3JAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|