A time-step model updates state by applying a rate over a fixed interval.

Program

Play the program to change the interval and watch the position update.

single_time_step.f90
program single_time_step_demo
    implicit none
    real :: position
    real :: velocity
    real :: dt

    position = 0.0
    velocity = 4.0
    dt = 
    position = position + velocity * dt
    print '(F0.1)', position
end program single_time_step_demo
program single_time_step_demo
    implicit none
    real :: position
    real :: velocity
    real :: dt

    position = 0.0
    velocity = 4.0
    dt = 
    position = position + velocity * dt
    print '(F0.1)', position
end program single_time_step_demo
program single_time_step_demo
    implicit none
    real :: position
    real :: velocity
    real :: dt

    position = 0.0
    velocity = 4.0
    dt = 
    position = position + velocity * dt
    print '(F0.1)', position
end program single_time_step_demo
time step `dt` is the modeled amount of time advanced by one update.
rate update `velocity * dt` converts a rate into a position change.
state variable `position` is updated in place to hold the new state.