echo binary

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lisa Pearlson

    echo binary

    how can I echo the decimal number 0 instead of the ascii "0" ?
    passthru can do it in response to a shell function. Is there another way?
    does echo pack("C", 0) do it?

    Lisa


  • madmaster

    #2
    Re: echo binary

    what is the idea of that? since whenever you echo something you echo a
    character ot srting in common. Do you mean to make it as a return value
    of execution of the script?

    Comment

    • Des

      #3
      Re: echo binary

      do you mean zero as in a true false condition?

      Comment

      • Christopher Story

        #4
        Re: echo binary


        "Lisa Pearlson" <no@spam.plz> wrote in message news:43043869$0 $5028$e4fe514c@ dreader11.news. xs4all.nl...[color=blue]
        > how can I echo the decimal number 0 instead of the ascii "0" ?
        > passthru can do it in response to a shell function. Is there another way?
        > does echo pack("C", 0) do it?
        >
        > Lisa[/color]

        echo char(00);

        will do it....

        chris


        Comment

        • Lisa Pearlson

          #5
          Re: echo binary

          hmm, weird, echo(00) echoes '0';

          Many shell scripts written in php also exit like this:

          exit(0);

          But that also prints the ascii character '0';
          weird.

          I think echo pack('C', 0) should work..

          Lisa

          "Christophe r Story" <ke6rwj@spam-eater-remove-me-msn.com> wrote in message
          news:jeXMe.7335 $F_7.5240@fe06. lga...[color=blue]
          >
          > "Lisa Pearlson" <no@spam.plz> wrote in message
          > news:43043869$0 $5028$e4fe514c@ dreader11.news. xs4all.nl...[color=green]
          >> how can I echo the decimal number 0 instead of the ascii "0" ?
          >> passthru can do it in response to a shell function. Is there another way?
          >> does echo pack("C", 0) do it?
          >>
          >> Lisa[/color]
          >
          > echo char(00);
          >
          > will do it....
          >
          > chris
          >
          >[/color]


          Comment

          Working...