Announcement

Collapse
No announcement yet.

Pointers in functions and subroutines

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Pointers in functions and subroutines

    Dear Dave,

    What I really mis is that there is no possibility to use pointers in arguments and as give it back as a function value. Also the be absent of constant pointers as arguments and the function value is missing.
    I’m sure to learn all the languages, because I find PowerBASIC very powerful and you know how to make the language stronger by a absorbing certain OOP etc.
    I would like to have that you implement this in all compilers.
    I’d love to submit that possibility to the Developers en Research of the company.

    I forgot something else:
    I that possible that you build-in (PBDOS/PBCC/PBDLL) constant pointers?

    Yours sincerely
    Stephane


    [This message has been edited by stephane fonteyne (edited March 14, 2000).]

  • #2
    Sure you can:
    Code:
    'Not all code posted, this is only a sample that you CAN.
    
    Function Host_to_IP(hName As Asciiz) As String
    hostent = GetHostByName(hName)
    
    If hostent=0 Then
      WSAErMsg = WSAGetLastError
      Function = WSAErMsgToStr(WSAErMsg)
    Else
      lpaddr.s_addr = @[email protected]@h_list
      'Get the ip address
      ptr1 = inet_ntoa(lpaddr.s_addr)
      Function = @ptr1
    End If
    End Function

    ------------------
    Scott
    mailto:[email protected][email protected]</A>
    Scott Turchin
    MCSE, MCP+I
    http://www.tngbbs.com
    ----------------------
    True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

    Comment


    • #3
      I'll add "constant pointers" to the wish list. Thanks for the suggestion.

      ------------------

      Comment

      Working...
      X