Re: Coming From QBasic

new topic     » goto parent     » topic index » view thread      » older message » newer message

Lynn Kilroy wrote:
> 
> Would it be possible to rename these functions?  I assume they're function,=
> 

 Yes as long as they haven't been declared in the standard Euphoria functions.
 Don't worry if they have you will get a namesake error.


Hello Lynn,

As Chris says  the closest thing to subrounts in Euphoria
are functions and  procedures.

Actually procedure is the same as subroute.

And function is the same as procedure except that it returns something.
Forget about goto.

procedure print_my_name()
puts(1,"Lynn")
end procedure

function get_name_length(sequence name)
  retiurn length(name)
end function

----program
integer a
print_my_name()
printf(1,"my name is %d letters long",get_name_length("Lynn"))


You may notice that Euphoria comes with many standard include files such as
get.e.
You may write your own function and procedure and put them in your own include
file.

--file myget.e
   You could put the above function and procedure in that file,
   And put file in with the standard includes.
 From then on to use them in your program just put at the begining of your
program.
include myget.e

I hope this is helpful.
I know I switch to Euphoria from Liberty Basic so long ago I forgot what
Inkey$ is exactlly.

I switch mostly because of speed.

Don Cole
 A Bug is an un-documented feature.
A Feature is a documented Bug.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu