Jump to content
IGNORED

Help with Atari 7800 Basic


bjbell52

Recommended Posts

I'm trying to write a short user defined function in Atari 7800 Basic. I can't find any examples in the sample programs that come with it. The 7800 User Guide says you can and gives this example... It doesn't compile, I get this error message "ERROR, extraneous end statement found. I originally didn't indent the "end" but I tried to indent it and that didn't work.

What am I missing?

 

   function sgn
   rem this function returns the sign of a number
   rem if 0 to 127, it returns 1
   rem if -128 to 1 (or 128 to 255), it returns -1 (or 255)
   rem if 0, it returns 0
   if temp1=0 then return 0
   if temp1 <128 then return 1 else return 255
end
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...