Den Wert des Bitcoin vorrausberechnen? Der EVAL-Befehl.

Moderator: MVogt

Post Reply
User avatar
Theo_Gottwald
Posts: 367
Joined: 03. Oct 2009, 08:57
Location: Herrenstr.11 * 76706 Dettenheim
Contact:

Den Wert des Bitcoin vorrausberechnen? Der EVAL-Befehl.

Post by Theo_Gottwald » 01. Mar 2018, 18:11

Die GRN\-Befehle sind Universal Befehle. Sie sind an sich eher Test-Befehle der Entwickler, aber da wo es funktioniert kann man diese einsetzen.
Einer der Befehle ist der EVAL-Befehl. Er kann auch Klammern rechnen, was die Berechnung von komplexeren Formeln sehr vereinfacht.

Code: Select all

' Beispiel
' VAR\$$FOR=3*5*(8+9)
' GRN\m_eval|$$FOR|i>$$OUT
  Befehl | Formel | Options>Ausgabevariable 

[N/V] = Numerical Value or variable containing a numerical value
[Operator] = + - * / \ ^ %

+ Addition
- Subtraction
* Multiplication
/ Division
\ Integer-Division
% is the "Modulo Operator"
^ power
The result of these numeric operations is a always a Floating-Point Number.

The following Operators enable you to include decisions into the formula.
! unequal -Operator
= Equal-Operator
< smaller then
> greater then

The Result of these logical operation is always 0 or 1.
Unlike elsewhere, the Operators do NOT work binary, but on decision true (1) or false (0). See Examples.

EVAL uses "Operator Precedence" as follows:
1. The logical Decisions: =!<> are calculated first with equal priority.
2. The ^ Operator is been calculated before any other numerical calculation.
3. The "*/\%" Operators are calculated with equal precedence each after the other next.
4. Finally the "+-" are calculated.

P2 - optional Options. Using these Options, you can round or truncate the result of the calculation to an integer. Using this Options, you can use the EVAL-Command to round one variable into another one.

' bei zusätzliches Parametern geht folgendes:
' |i - Integer Result
' |c - CEIL Result (Convert a  variable or expression into an  value, by returning the smallest integral value that is greater than or equal to its argument.)
' |x - strips off the fractional part of its argument, and returns the integer part.
' |f - returns the number after the decimal point of a floating-point number or expression.
' |a - Absolutwert (non-negative value)
' |r - rundet auf 2 Dezimalstellen
' |s - returns only -1,0 or 1 depending on prefix of numeric result
' |# - use DEG instead of RAD
' All the Letters can be combined
Als Beispiel habve ich mal ein Skript gemacht, das die historische Wertentwicklung des Bitcoin hochrechnet auf die Zukunft.
Natürlich ohne Gewähr, aber mit "m_eval". Noch der Hinweis, dass CAL\ nicht direkt compatibel mit "m_eval" ist, da beide andere Trennzeichen verwenden. "m_eval" verwendet immer das englische "." also zum Beispiel "0.33". Cal\ passt sich den Windows-Einstellungen an und verwendet ggf. "," also "0,33". Daher sollte man Zahlen aus beiden Befehlen nicht mischen.

Code: Select all

'#EXE:?path
'#SPI:ForceWrite
'#SPI:VBRun
'#SPI:NoAuto
'#SPI:x64
'#FDC:Ask
'#MAN:ra
'#ICS:12
'
'DED\1
KRM\2
VAR\$$BTO=$ev4$\BTOM.txt
DEL\$$BTO
VAR\$$STA=01.02.2012
' Liegt zwischen 153 und 166 steigend
VAR\$$CYS=158
VAR\$$VAL=1
GRN\dtn.|$$STA
VAR\$$STV=$v1$
VAR\$$NEV=$$VAL
VAR\$$OUT=
VAR\$$NED=$$STV
FOR\$$LOP|1|30
   VAR\$$FOR=$$LOP+$$CYS
   GRN\m_eval|$$FOR|>$$CYC
   VAR\$$NVO=$$NEV
   VAR\$$FOR=$$NEV*2
   GRN\m_eval|$$FOR|>$$NEV   
   VAR\$$NEO=$$NED
   CAL\$$NED=$$NED+$$CYC
   GRN\ntd.|$$NED
   VAR\$$DAT=$v1$
   VAR\$$FOR=($$NEV-$$NVO)/$$CYC
   GRN\m_eval|$$FOR|>$$DAF
   FOR\$$DAY|1|$$CYC
      VAR\$$FOR=$$NEO+$$DAY-1
      GRN\m_eval|$$FOR|>$$ADY
      GRN\ntd.|$$ADY
      VAR\$$DAX=$v1$
      VAR\$$FOR=($$NVO+($$DAF*($$DAY-1)))
      GRN\m_eval|$$FOR|i>$$DAI
      VAR\$$OUT=$$DAX-$$DAI$crlf$$$OUT
   NXT\
   VAR\$$OUT=$$DAT-$$NEV$crlf$$$OUT
NXT\
CTF\$$BTO<$$OUT~
MBX\Ready
@
Wer mehr Hintergründe zum Bitcoin Wert sehen möchte kann sich mein Video dsazu ansehen:
Bitcoin wann 1 Mio., wann 500.000 US$

Post Reply

Return to “Package Robot”

Who is online

Users browsing this forum: No registered users and 4 guests