LOOKUP/de

From MCS Wiki AVR
< LOOKUP(Difference between revisions)
Jump to: navigation, search
((**COPIED FROM ENGLISH PAGE**) =)
(Example)
 
(3 intermediate revisions by one user not shown)
Line 15: Line 15:
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
  
= <span class="f_Header">Remarks</span> =
+
= <span class="f_Header">Anmerkungen</span> =
 
<div style="padding: 0px; margin: 0px 0px 0px 4px;">
 
<div style="padding: 0px; margin: 0px 0px 0px 4px;">
 
{| width="488" cellspacing="0" cellpadding="1" border="1" style="border: 2px solid rgb(0, 0, 0); border-spacing: 0px; border-collapse: collapse;"
 
{| width="488" cellspacing="0" cellpadding="1" border="1" style="border: 2px solid rgb(0, 0, 0); border-spacing: 0px; border-collapse: collapse;"
Line 23: Line 23:
  
 
| valign="top" width="100%" style="width: 395px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="100%" style="width: 395px; border: 1px solid rgb(0, 0, 0);" |  
The returned value
+
Der zurückgegebene Wert.
  
 
|- style="vertical-align: top;"
 
|- style="vertical-align: top;"
Line 30: Line 30:
  
 
| valign="top" width="100%" style="width: 395px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="100%" style="width: 395px; border: 1px solid rgb(0, 0, 0);" |  
A value with the index of the table
+
Ein Tabellenindex
  
 
|- style="vertical-align: top;"
 
|- style="vertical-align: top;"
Line 37: Line 37:
  
 
| valign="top" width="100%" style="width: 395px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="100%" style="width: 395px; border: 1px solid rgb(0, 0, 0);" |  
The label where the data starts
+
Die Programmmarke an der die Daten beginnen.
  
 
|}
 
|}
Line 43: Line 43:
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
  
The value can be up to 65535. 0 will return the first entry.
+
Maximaler Tabellenindex ist 65535. 0 gibt den ersten Eintrag zurück.
  
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
Line 49: Line 49:
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
  
= <span class="f_Header">See also</span> =
+
= <span class="f_Header">Siehe auch</span> =
  
 
[[LOOKUPSTR]]&nbsp;,&nbsp;[[DATA]]&nbsp;,&nbsp;[[LOOKDOWN]]
 
[[LOOKUPSTR]]&nbsp;,&nbsp;[[DATA]]&nbsp;,&nbsp;[[LOOKDOWN]]
Line 57: Line 57:
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
  
= <span class="f_Header">Example</span> =
+
= <span class="f_Header">Beispiel</span> =
  
 
<br/><source lang="bascomavr">
 
<br/><source lang="bascomavr">

Latest revision as of 23:40, 4 March 2013

Contents

Funktion

Gibt den Wert einer Tabelle zurück.

 

 

Syntax

var = LOOKUP( value, label)

 

 

Anmerkungen

Var

Der zurückgegebene Wert.

Value

Ein Tabellenindex

Label

Die Programmmarke an der die Daten beginnen.

 

Maximaler Tabellenindex ist 65535. 0 gibt den ersten Eintrag zurück.

 

 

Siehe auch

LOOKUPSTR , DATA , LOOKDOWN

 

 

Beispiel


$regfile = "m48def.dat" ' specify the used micro
$crystal = 4000000 ' used crystal frequency
$baud = 19200 ' use baud rate
$hwstack = 32 ' default use 32 for the hardware stack
$swstack = 10 ' default use 10 for the SW stack
$framesize = 40 ' default use 40 for the frame space
 
Dim B1 As Byte , I As Integer
B1 = Lookup(2 , Dta)
Print B1 ' Prints 3 (zero based)
 
I = Lookup(0 , Dta2) ' print 1000
Print I
End
 
 
Dta:
Data 1 , 2 , 3 , 4 , 5
Dta2:
Data 1000% , 2000%

Languages   English Deutsch  
Personal tools
Namespaces
Variants
Actions
Navigation
In other languages
Language