Skip to Content

As a developer/researcher, you sometimes try silly things. Some of these actually provide results you want to share.

Here’s one: What would happen if you created this program and tried to run it?

Important: Answer by running your own compiler (the one in your brain), before hacking in into SE80 😉

REPORT ZTEST.


DO '0.5' TIMES.
  WRITE 'Hello world!'.
ENDDO.

Answer:

A) Does not compile

B) Runs, but no output on screen

C) Prints Hello on the screen

D) Dumps when being executed

E) Prints Hello world! on the screen

F) Goes into an infinite loop

G) Prints Hello world! five times on the screen

Would you have guessed?

To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

  1. Syed Hussain

    Hii Andreas,

    It’s cool.

    But the ‘0.5’ will be shown as red.

    But did’nt get your point for writing this code what you want to convey?

    Is this code  vulnerable towards SQL injection?

    By the way Thanks for sharing.

    Regards

    Syed

    (0) 
    1. Andreas Wiegenstein Post author

      Hi Syed,

      this is just an experiment. No purpose. No vulnerabilities here. Not even a SQL Injection 😉

      Could you pls. remove the line with your answer, so other readers can still guess?

      Thx, Andreas

      (0) 
  2. Avirat Patel

    Hi Andreas,

    It would be round of mechanism inside as per my experiment.

    suppose you run with

         ‘0.4’ no output

         ‘0.5’ execute 1 time

         ‘1.4’ execute 1 time

         ‘1.5’ execute 2 times.

    Regards

    Avirat

    (0) 

Leave a Reply