SPC/de

(Difference between revisions)
Jump to: navigation, search
(Example)
(Beispiel)
Line 61: Line 61:
 
'suited for demo : yes
 
'suited for demo : yes
 
'commercial addon needed : no
 
'commercial addon needed : no
'purpose : demonstrates DEG2RAD function
+
'purpose : demonstrates SPC function
 
   
 
   
 
'-------------------------------------------------------------------------------
 
'-------------------------------------------------------------------------------
Line 73: Line 73:
 
   
 
   
 
Dim S As String * 15 , Z As String * 15
 
Dim S As String * 15 , Z As String * 15
Print "{" ; Spc(5) ; "}" '{ }
+
Print "{" ; Spc(5) ; "}"     '{     }
Lcd "{" ; Spc(5) ; "}" '{ }
+
Lcd "{" ; Spc(5) ; "}"     '{     }
 
</source><br/>{{Languages}}
 
</source><br/>{{Languages}}
  
 
[[Category:BASCOM Language Reference/de]]
 
[[Category:BASCOM Language Reference/de]]

Revision as of 01:33, 1 March 2013

Contents

Funktion

Gibt die angegebene Anzahl Leerzeichen aus.

 

 

Syntax

PRINT SPC(x)

LCD SPC(x)

 

 

Remarks

X

The number of spaces to print.

 

Using 0 for x will result in a string of 255 bytes because there is no check for a zero length assign.

 

SPC can be used with LCD too.

 

The difference with the SPACE function is that SPACE returns a number of spaces while SPC() can only be used with printing. Using SPACE() with printing is also possible but it will use a temporary buffer while SPC does not use a temporary buffer.

 

 

Siehe auch

SPACE

 

 

Beispiel


'-------------------------------------------------------------------------------
'copyright : (c) 1995-2005, MCS Electronics
'micro : Mega48
'suited for demo : yes
'commercial addon needed : no
'purpose : demonstrates SPC function
 
'-------------------------------------------------------------------------------
 
$regfile = "m48def.dat" ' specify the used micro
$crystal = 8000000 ' Taktfrequenz
$baud = 19200 ' Baudrate
$hwstack = 32 ' default use 32 for the hardware stack
$swstack = 40 ' default use 10 for the SW stack
$framesize = 40 ' default use 40 for the frame space
 
Dim S As String * 15 , Z As String * 15
Print "{" ; Spc(5) ; "}"     '{     }
Lcd "{" ; Spc(5) ; "}"     '{     }

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