Copying Array to Array


Results 1 to 5 of 5

Threaded View

  1. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Works fine here!
    Code:
    String1 Var Byte(26)
    String2 Var Byte(26)
    Index Var Byte
     
       PAUSE 5000
       Hserout ["Testing",13,10]  
     
    Main:   
       Clear     ' Clear RAM before entry
     
       ' Load String1 with data
       ARRAYWRITE String1,["ABCDEFGHIJKLMNOPQRSTUVWXYZ"]
     
       ' Show what's in String1  
       Hserout [13,10,"String1 = "]
       For Index = 0 TO 25
           Hserout [String1(Index)]
       Next Index
     
       ' Copy String1 to String2
       ARRAYWRITE String2, [STR String1\26]
     
       ' Show what's in String2 
       Hserout [13,10,"String2 = "]
       For Index = 0 TO 25
           Hserout [String2(Index)]
       Next Index
       Pause 500
       Goto Main
    Returns;
    Code:
    Testing
    String1 = ABCDEFGHIJKLMNOPQRSTUVWXYZ
    String2 = ABCDEFGHIJKLMNOPQRSTUVWXYZ
    Last edited by Bruce; - 23rd April 2010 at 23:51. Reason: Result
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts