Announcement

Collapse
No announcement yet.

new to functions return value and all

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

    new to functions return value and all


    function test1 (ucwidth , rtod)
    a2 = ucwidth * rtod
    ang1 = a2
    print "ang1",ang1
    test1 = ang1
    end function

    test1 .4 , 5

    print "ang1 function",ang1

    what am i missing
    br

    #2
    Hi Brian, try this:

    function test1 (ucwidth , rtod)
    a2 = ucwidth * rtod

    ang1 = a2
    'print "ang1",ang1 Not sure why you are doing this here
    test1 = ang1
    end function

    result = test1(.4 , 5) 'Need to supply a variable to hold
    'return value when function is called,
    'also need () when calling a function
    'that returns a value

    print "ang1 function",result 'Print the return value from
    'function here.
    Hope this works for ya',
    Adam Ritchie


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


    [This message has been edited by Adam Ritchie (edited February 04, 2000).]

    Comment


      #3
      thanks adam
      regards brian

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

      Comment

      Working...
      X
      😀
      🥰
      🤢
      😎
      😡
      👍
      👎