1. syntax error ?????????

Why does this code give me a syntax error when I run it ???????



function foo(atom x)
--
  return 0
--
end function

function fum(atom fee)
--
  foo(fee)
  return 0
--
end function

new topic     » topic index » view message » categorize

2. Re: syntax error ?????????

You need to assign the result from a function to a value.
In fum(), use something like=20

atom junk
junk =3D foo(fee)

HTH,
Michael J. Sabal
mjs at osa.att.ne.jp=20


>>> Bernie Ryan <bwryan at PCOM.NET> 01/27/00 10:06AM >>>
Why does this code give me a syntax error when I run it ???????



function foo(atom x)
--
  return 0
--
end function

function fum(atom fee)
--
  foo(fee)
  return 0
--
end function

new topic     » goto parent     » topic index » view message » categorize

3. Re: syntax error ?????????

Bernie,
You can't call a function without assigning it's
return value.
try:
function foo(atom x)
--
  return 0
--
end function

function fum(atom fee)
--
  atom trash
  trash=foo(fee)
  return 0
--
end function

-E.Allen Soard

---- Begin Original Message ----
 From: Bernie Ryan <bwryan at PCOM.NET>
Sent: Thu, 27 Jan 2000 10:06:54 -0500

To: EUPHORIA at LISTSERV.MUOHIO.EDU
Subject: syntax error ?????????

Why does this code give me a syntax error when I
run it ???????



function foo(atom x)
--
  return 0
--
end function

function fum(atom fee)
--
  foo(fee)
  return 0
--
end function

---- End Original Message ----


Bookmark the HyperMart Small Business Center. All the tools you need to
succeed!
http://www.hypermart.net/center/

new topic     » goto parent     » topic index » view message » categorize

4. Re: syntax error ?????????

Never mind I see what is wrong ?

   The error message error is miss leading or not clear enough.

   It says expected to see possibly 'end', not a function


   It seems to me it should tell me that there is no varible to

   receive a return value from a function.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu