Zahlenzauber

Hier ein kleiner Zahlenzauber von Stefan Mett. Wer den Quelltext enträtseln kann, kommt vielleicht hinter das Geheimnis…

*&———————————————————————*
*& Report Z_SM_FUN                                                     *
*& Von Stefan Mett                                                     *
*&———————————————————————*
REPORT  Z_SM_FUN.
Data: g_zaehler Type i, g_icon Type icon_d, g_text(2) Type C, g_text2(2)
 Type C, g_space(5) Type C, g_wizard type icon_d, g_divide type f,
g_frac type f, g_magic(2) TYPE C, g_sum Type f, g_rnd type i,
gf_stamp(11) type p decimals 7,gf_stamp2(11) type p decimals 7,
gf_ergeb type n, gf_sekbt(2) type n, gf_hilf(22) type n,
g_char1(1) type C, g_char2(1) type C. g_space = ‘     ‘.
g_zaehler = 0. g_wizard = ‘@BY@’. get time stamp field gf_stamp. write
gf_stamp to gf_hilf. move gf_hilf+16(2) to gf_sekbt. while gf_sekbt >=
15. get time stamp field gf_stamp. write gf_stamp to gf_hilf. move
gf_hilf+16(2) to gf_sekbt. endwhile. case gf_sekbt+0(1).   when 1.
g_char1 = ‘A’.    when 2. g_char1 = ‘B’.  when 3.  g_char1
=’C’.  when 4.  g_char1 = ‘D’.  when 5.  g_char1 = ‘E’.  when 6. g_char1
 = ‘F’.  when 7.  g_char1 = ‘G’.  when 8.  g_char1 = ‘H’.  when 9
. g_char1 = ‘I’.  when 10.  g_char1 = ‘J’.    when 11.  g_char1 = ‘K’.
when 12.  g_char1 = ‘L’.  when 13.  g_char1 = ‘M’.  when 14.  g_char1 =
‘N’.  when 15.  g_char1 = ‘O’.  when 0.  g_char1 = ‘P’.endcase. case
gf_sekbt+1(1).   when 1.  g_char2 = ‘A’.    when 2.  g_char2 = ‘B’.
when 3.  g_char2 =
 ‘C’.  when 4.  g_char2 = ‘D’.  when 5.  g_char2 = ‘E’.  when 6. g_char2
 = ‘F’.  when 7.  g_char2 = ‘G’.  when 8.  g_char2 = ‘H’.  when 9
.  g_char2 = ‘I’.  when 10.  g_char2 = ‘J’.    when 11.  g_char2 = ‘K’.
when 12.  g_char2 = ‘L’.  when 13.  g_char2 = ‘M’.  when 14.  g_char2 =
‘N’.  when 15.  g_char2 = ‘O’.  when 0.  g_char2 = ‘F’. endcase.
while g_zaehler < 100. g_divide = g_zaehler / 9. g_frac = frac( g_divide
 ).
get time stamp field gf_stamp. write gf_stamp to gf_hilf. move
gf_hilf+16(2) to gf_sekbt. gf_stamp = gf_stamp2. while gf_stamp =
gf_stamp2.   get time stamp field gf_stamp2. endwhile. g_text2 =
g_zaehler.
*if g_zaehler <= 10. *  concatenate ‘0’ gf_sekbt into g_text. *endif. *
if g_frac is initial. concatenate g_char1 g_char2 into gf_sekbt.
g_magic = gf_sekbt. endif.
concatenate ‘@’ gf_sekbt ‘@’ into g_icon.   Write:  G_icon, g_text2,
g_space. if g_zaehler = 4 or g_zaehler = 9 or g_zaehler = 14 or
g_zaehler = 19 or
 g_zaehler = 24 or g_zaehler = 29 or g_zaehler = 34 or g_zaehler = 39 or
 g_zaehler = 44 or g_zaehler = 49 or g_zaehler = 54 or g_zaehler = 59 or
 g_zaehler = 64 or g_zaehler = 69 or g_zaehler = 74 or g_zaehler = 79 or
 g_zaehler = 84 or g_zaehler = 89 or g_zaehler = 94 or g_zaehler = 99.
write : /. endif. g_zaehler = g_zaehler + 1. endwhile.
Write : / ‘Denken Sie siche eine beliebige zweistellige Zahl.’.
write :  ‘Zählen Sie dann die zwei Ziffern zusammen und ziehen’.
 write : / ‘Sie das Ergebnis von der ursprünglichen Zahl ab.’.
 write :  ‘Suchen Sie dann das zum Ergebnis passende Symbol in’.
 write :  ‘der Tabelle und konzentrieren Sie sich auf dieses.’.
 write : / ‘Klicken sie dann hier —>>’. write:  g_wizard hotspot on.
write:  ‘<<—‘.
AT LINE-SELECTION.   PERFORM line_selection.
FORM line_selection.   DATA: l_icon TYPE icon_d,
l_iconm type icon_d.
concatenate ‘@’ g_magic ‘@’ into l_iconm.   READ LINE sy-lilli FIELD
VALUE g_wizard    INTO l_icon.     FORMAT COLOR COL_HEADING INTENSIFIED
ON.     write: /.write: /.write: /.write: /.write: /.write: /.     write
: ‘SIE HABEN SICH FOLGENDES SYMBOL AUSGESUCHT: ‘.     write: l_iconm.
      write: /.write: /.write: /.write: /.write: /.write: /.     write:
/ ‘Unglaublich nicht wahr?’. ENDFORM.

Enno Wulff
Letzte Artikel von Enno Wulff (Alle anzeigen)