Skip to main content

Yet more ABAP fails

The following methods gives different results based upon indentation of source code:
PROGRAM test.

CLASS cl_test DEFINITION.
  PUBLIC SECTION.
    CLASS-METHODS bug1 RETURNING VALUE(r_string) TYPE string.
    CLASS-METHODS bug2 RETURNING VALUE(r_string) TYPE string.
ENDCLASS.

CLASS cl_test IMPLEMENTATION.

  METHOD bug1.
    CONCATENATE '______________________________________________________'
'______________________________________________________________________' " not indented
                '______________' INTO r_string.
  ENDMETHOD.

  METHOD bug2.
    CONCATENATE '______________________________________________________'
                '______________________________________________________________________' " indented
                '______________' INTO r_string.
  ENDMETHOD.

ENDCLASS.

START-OF-SELECTION.
  WRITE: / 'Exact same code, only differ in indent:',
         / `bug1: `, cl_test=>bug1( ),
         / `bug2: `, cl_test=>bug2( ).


Results:

Exact same code, only differ in indent:

bug1: ______________________________________________________'____...____
bug2: ___________________________________________________________...___

Comments

Popular posts from this blog

My Custom Mechanical 60% Keyboard Build

My Custom Mechanical 60% Keyboard Build All the parts   1x GH60 (Satan) board - $35 61x Cherry Clear switches  - $35 2x Cherry Blue switches - $3 10x Cherry Red switches - $10 1x PCB Stabilizer set (6.25 space) - $6 1x Royal Oak Glam 60% case (Black Walnut) - $78 1x Aluminium 60% plate - $19 1x SA profile Choclatier keycaps - $102 ( base, modifiers, and novelties ) 1x Braided Nylon USB cable - $15 Solder, Tools, Risers, Labor, etc. Total: ± $300 (Other single switch types added as needed) Testing the board I had my helper do the work here. We needed to test the board before applying any solder. Assembling Add the stabilizers first Add the plate (using a few switches as spacers) Then add the rest Solder solder solder... And test again: The casing The casing I received did to have built-in risers: So I added my own: Then Assemble (using temporary spare GMK Carbon Cherry-profile k...

Lock Screen on Mac OS X using keyboard shortcut.

1. Download "Global Hotkey" 2. Create a folder "Global Hotkey" and copy contents of downloaded DMG to that. 3. In a terminal do: cd "/Applications/Global Hotkey" ln -s /System/Library/Frameworks/ScreenSaver.framework/Versions/A/Resources/ScreenSaverEngine.app "command f10" 4. Make sure Screensaver is set to prompt for password (you may need to relog for this to take effect) 5. Preferences -> Accounts -> -> Login Items : Add "Global Hotkey.app" 6. Launch the app as well

Firefox: Open diverted links in new background tab instead of new window

This has frustrated me for a long time... something I really liked about Opera. Go to 'about:config' url and set: browser.tabs.loadInBackground to true (should be already) browser.tabs.showSingleWindowModePrefs to true browser.tabs.loadDivertedInBac kground to true Then in advanced preferences is a new option: 'Force links that open a new window to:' can be used for immesdiate effect.