1. Hell about Advanced object handling

------=_NextPart_000_000D_01C00AFA.B2A05E50
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

include get.e

atom atom_received, integer_received, sequence_received        --David, =
this is too complex for some people
sequence inputted_string

atom_received =3D 'n'            --Its a character straing storing some =
digit value right? But why?
integer_received =3D 'n'
sequence_received =3D 'n'

puts(1,"Enter any numeric value (such as 5.004 or -7)\n")

while atom_received =3D 'n' and integer_received =3D 'n' do    --Why is =
that??
     inputted_string =3D get(0)             --See get() is here =
recieveing a EU valid object, but why?
     if inputted_string[1] =3D 0 then    --Same goes for all code. =
Sigh!!! Is this hell??
          if integer(inputted_string[2]) then
               integer_received =3D 'y'
               puts(1,"\nThank you! This value is an integer!\n\n")
          else
               if atom(inputted_string[2]) then
                    atom_received =3D 'y'
                    puts(1,"\nThank you! This value is an atom!\n\n")
               end if
          end if
     end if
end while

puts(1,"Enter a sequence value (such as {54,-8,2.3} or \"Hi =
There!\")\n")

while sequence_received =3D 'n' do
     inputted_string =3D get(0)    =20
     if inputted_string[1] =3D 0 then
          if sequence(inputted_string[2]) then
               sequence_received =3D 'y'
          end if
     end if
end while

puts(1,"\nThank you! Program Finished!\n")




------=_NextPart_000_000D_01C00AFA.B2A05E50
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>include get.e</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>atom atom_received, integer_received,=20
sequence_received&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; --David, this is =
too=20
complex for some people<BR>sequence inputted_string</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>atom_received =3D 'n'&nbsp;&nbsp;&nbsp; =

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; --Its a character straing storing=20
some&nbsp;digit value right? But why?<BR>integer_received =3D=20
'n'<BR>sequence_received =3D 'n'</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>puts(1,"Enter any numeric value (such =
as 5.004 or=20
-7)\n")</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>while atom_received =3D 'n' and =
integer_received =3D=20
'n' do&nbsp;&nbsp;&nbsp; --Why is that??<BR>&nbsp;&nbsp;&nbsp;&nbsp;=20
inputted_string =3D get(0)&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; --See get() is here recieveing a EU valid object, but =

why?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;&nbsp; if =
inputted_string[1] =3D 0=20
then&nbsp;&nbsp;&nbsp; --Same goes for all code. Sigh!!! Is this=20
hell??<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if=20
integer(inputted_string[2])=20
;&nbsp;&nbsp;&nbsp;=20
integer_received =3D=20
&nbsp;&nbsp;&nbsp;=20
puts(1,"\nThank you! This value is an=20
integer!\n\n")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =

;&nbsp;&nbsp;&nbsp;=20
if atom(inputted_string[2])=20
atom_received =3D=20
puts(1,"\nThank you! This value is an=20
p;&nbsp;&nbsp;&nbsp;&nbsp;=20
end if<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end=20
if<BR>&nbsp;&nbsp;&nbsp;&nbsp; end if<BR>end while</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>puts(1,"Enter a sequence value (such as =
{54,-8,2.3}=20
or \"Hi There!\")\n")</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>while sequence_received =3D 'n'=20
do<BR>&nbsp;&nbsp;&nbsp;&nbsp; inputted_string =3D =
get(0)&nbsp;&nbsp;&nbsp;&nbsp;=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp; if inputted_string[1] =3D 0=20
then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if=20
sequence(inputted_string[2])=20
;&nbsp;&nbsp;&nbsp;=20
sequence_received =3D=20
'y'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end=20
if<BR>&nbsp;&nbsp;&nbsp;&nbsp; end if<BR>end while</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>puts(1,"\nThank you! Program=20
Finished!\n")</FONT></DIV>
<DIV>&nbsp;</DIV>

------=_NextPart_000_000D_01C00AFA.B2A05E50--

new topic     » topic index » view message » categorize

2. Re: Hell about Advanced object handling

------=_NextPart_000_00B4_01C00B00.8E9AF780
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Asif,

The 'n' and 'y' are there because EU doesn't know boolean TRUE and FALSE =
values.
Maybe it's easier to read after declaring:

constant TRUE =3D 'y', FALSE =3D 'n'
    or even:
constant TRUE =3D 1, FALSE =3D 0

then you can replace every occurrence of 'n' with FALSE and 'y' with =
TRUE.
Further read the accompanying text with ABGTE.
This program tells you if you entered a valid atom, integer or sequence.

Ad
  ----- Oorspronkelijk bericht -----=20
  Van: Asif Masood Baloch=20
  Aan: EUPHORIA at LISTSERV.MUOHIO.EDU=20
  Verzonden: maandag 21 augustus 2000 8:02
  Onderwerp: Hell about Advanced object handling


  include get.e

  atom atom_received, integer_received, sequence_received        =
--David, this is too complex for some people
  sequence inputted_string

  atom_received =3D 'n'            --Its a character straing storing =
some digit value right? But why?
  integer_received =3D 'n'
  sequence_received =3D 'n'

  puts(1,"Enter any numeric value (such as 5.004 or -7)\n")

  while atom_received =3D 'n' and integer_received =3D 'n' do    --Why =
is that??
       inputted_string =3D get(0)             --See get() is here =
recieveing a EU valid object, but why?
       if inputted_string[1] =3D 0 then    --Same goes for all code. =
Sigh!!! Is this hell??
            if integer(inputted_string[2]) then
                 integer_received =3D 'y'
                 puts(1,"\nThank you! This value is an integer!\n\n")
            else
                 if atom(inputted_string[2]) then
                      atom_received =3D 'y'
                      puts(1,"\nThank you! This value is an atom!\n\n")
                 end if
            end if
       end if
  end while

  puts(1,"Enter a sequence value (such as {54,-8,2.3} or \"Hi =
There!\")\n")

  while sequence_received =3D 'n' do
       inputted_string =3D get(0)    =20
       if inputted_string[1] =3D 0 then
            if sequence(inputted_string[2]) then
                 sequence_received =3D 'y'
            end if
       end if
  end while

  puts(1,"\nThank you! Program Finished!\n")


  =20

------=_NextPart_000_00B4_01C00B00.8E9AF780
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>Asif,</DIV>
<DIV>&nbsp;</DIV>
<DIV>The 'n' and 'y' are there because EU doesn't know boolean TRUE and =
FALSE=20
values.</DIV>
<DIV>Maybe it's easier to read after declaring:</DIV>
<DIV>&nbsp;</DIV>
<DIV>constant TRUE =3D 'y', FALSE =3D 'n'</DIV>
<DIV>&nbsp;&nbsp;&nbsp; or even:</DIV>
<DIV>constant TRUE =3D 1, FALSE =3D 0</DIV>
<DIV>&nbsp;</DIV>
<DIV>then you can replace every occurrence of 'n' with FALSE and 'y' =
with=20
TRUE.</DIV>
<DIV>Further read the accompanying text with ABGTE.</DIV>
<DIV>This program tells you if you entered a valid atom, integer or=20
sequence.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Ad</DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
  <DIV style=3D"FONT: 10pt arial">----- Oorspronkelijk bericht ----- =
</DIV>
  <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>Van:</B>=20
  <A href=3D"mailto:cyberego at QTA.PAKNET.COM.PK"=20
  title=3Dcyberego at QTA.PAKNET.COM.PK>Asif Masood Baloch</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Aan:</B> <A=20
  href=3D"mailto:EUPHORIA at LISTSERV.MUOHIO.EDU"=20
  title=3DEUPHORIA at LISTSERV.MUOHIO.EDU>EUPHORIA at LISTSERV.MUOHIO.EDU</A> =
</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Verzonden:</B> maandag 21 augustus =
2000=20
  8:02</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Onderwerp:</B> Hell about Advanced =
object=20
  handling</DIV>
  <DIV><BR></DIV>
  <DIV><FONT face=3DArial size=3D2>include get.e</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>atom atom_received, integer_received, =

  sequence_received&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; --David, this =
is too=20
  complex for some people<BR>sequence inputted_string</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>atom_received =3D =
'n'&nbsp;&nbsp;&nbsp;=20
  &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; --Its a character straing =
storing=20
  some&nbsp;digit value right? But why?<BR>integer_received =3D=20
  'n'<BR>sequence_received =3D 'n'</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>puts(1,"Enter any numeric value (such =
as 5.004 or=20
  -7)\n")</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>while atom_received =3D 'n' and =
integer_received =3D=20
  'n' do&nbsp;&nbsp;&nbsp; --Why is that??<BR>&nbsp;&nbsp;&nbsp;&nbsp;=20
  inputted_string =3D get(0)&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
  &nbsp;&nbsp;&nbsp; --See get() is here recieveing a EU valid object, =
but=20
  why?</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;&nbsp; if =
inputted_string[1] =3D=20
  0 then&nbsp;&nbsp;&nbsp; --Same goes for all code. Sigh!!! Is this=20
  hell??<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if=20
  integer(inputted_string[2])=20
  =
;&nbsp;&nbsp;&nbsp;=20
  integer_received =3D=20
  =
&nbsp;&nbsp;&nbsp;=20
  puts(1,"\nThank you! This value is an=20
  =
integer!\n\n")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =

  =
;&nbsp;&nbsp;&nbsp;=20
  if atom(inputted_string[2])=20
  =
  atom_received =3D=20
  =
  puts(1,"\nThank you! This value is an=20
  =
p;&nbsp;&nbsp;&nbsp;&nbsp;=20
  end if<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end=20
  if<BR>&nbsp;&nbsp;&nbsp;&nbsp; end if<BR>end while</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>puts(1,"Enter a sequence value (such =
as=20
  {54,-8,2.3} or \"Hi There!\")\n")</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>while sequence_received =3D 'n'=20
  do<BR>&nbsp;&nbsp;&nbsp;&nbsp; inputted_string =3D=20
  get(0)&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp; if=20
  inputted_string[1] =3D 0=20
  then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if=20
  sequence(inputted_string[2])=20
  =
;&nbsp;&nbsp;&nbsp;=20
  sequence_received =3D=20
  'y'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end=20
  if<BR>&nbsp;&nbsp;&nbsp;&nbsp; end if<BR>end while</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>puts(1,"\nThank you! Program=20
  Finished!\n")</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial =

------=_NextPart_000_00B4_01C00B00.8E9AF780--

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

Search



Quick Links

User menu

Not signed in.

Misc Menu