B4R Question objectcopy

Discussion in 'B4R Questions' started by Tayfur, Jul 2, 2019.

Similar threads

B4R Tutorial UDP Communication
Other B4R v1.20 BETA - Support for ESP8266 Boards
B4R Tutorial Ethernet / Network Tutorial
B4R Library WebSocketClient
B4R Tutorial MQTT
  1. Tayfur

    Tayfur Well-Known Member Licensed User

    why not copy? Length =0 inside is empty
    or how can set value on public Server_IP?

    "global non-primative variables are always constatn"

    I recived erorrs sometine.
    How can i uopdate gloabal varibeles with string /byte/int.. etc


    Code:
    ' for info>>>>
    'Public Server_IP() As Byte
    'Sub SplitIP(IPbuffer() As Byte ) As Byte()

    '-----------------------
    If bc.IndexOf(s, "a1=") <> -1 Then 'server bağlantı ıp
                SplitIP((bc.SubString(s,"a1=".Length)))
                
    Dim o1(4As Byte=SplitIP((bc.SubString(s,"a1=".Length)))
                
    Log(o1.Length)
                
    Log("0:",o1(0)) 'returned >> 0:192
                Log("1:",o1(1))'returned >> 1:168
                Log("2:",o1(2))'returned >> 2:1
                Log("3:",o1(3))'returned >> 3:5
                bc.ObjectCopy(o1,Server_IP,o1.Length)
                
    Log("Server_IP:",Server_IP.Length)'returned >> Server_IP:0
                Log("Server_IP:",Server_IP)'returned >> Server_IP:
            End If
     
    Last edited: Jul 2, 2019
  2. Erel

    Erel Administrator Staff Member Licensed User

    Use GlobalStore for this.
     
    Tayfur likes this.
  3. Tayfur

    Tayfur Well-Known Member Licensed User

    yes; I read the descriptions on globalstore .Now understantd issue.

    Thanks
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice