online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
program test implicit none; character, allocatable :: a(:), a3d(:,:,:) character :: NL = new_line( 'x' ) integer ni, nj, nchannels integer i, j ni = 3; nj = 4; nchannels = 5 ! Original array a = [ ( achar( iachar( 'a' ) + modulo( i - 1, 26 ) ), i = 1, ni * nj * nchannels ) ] ! Reshaped array a3d = reshape( a, [nchannels,nj,ni] ) ! allocate, copy and reshape ! Print reshaped array write( *, "( *( a ) )" ) ( ( a3d(:,j,i), NL, j = 1, nj ), NL, i = 1, ni ) deallocate( a, a3d ) end program test

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue