Standing long-period (with the periods longer than several minutes) oscillations in large hot (with the temperature higher than 3 MK) coronal loops have been observed as the quasi-periodic modulation of the EUV and microwave intensity emission and the Doppler shift of coronal emission lines, and have been interpreted as standing slow magnetoacoustic (longitudinal) oscillations. Quasi-periodic pulsations of shorter periods, detected in thermal and non-thermal emissions in solar flares could be produced by a similar mechanism. We present theoretical modelling of the standing slow magnetoacoustic mode, showing that this mode of oscillation is highly sensitive to peculiarities of the radiative cooling and heating function. We generalised the theoretical model of standing slow magnetoacoustic oscillations in a hot plasma, including the effects of the radiative losses, and accounting for plasma heating. The heating mechanism is not specified and taken empirically to compensate the cooling by radiation and thermal-conduction. It is shown that the evolution of the oscillations is described by a generalised Burgers equation. Numerical solution of an initial value problem for the evolutionary equation demonstrates that different dependences of the radiative cooling and plasma heating on the temperature lead to different regimes of the oscillations, including growing, quasi-stationary and rapidly decaying. Our findings provide a theoretical foundation for probing the coronal heating function, and may explain the observations of decayless long-period quasi-periodic pulsations in flares. The hydrodynamic approach employed in this study should be considered with caution in the modelling of non-thermal emission associated with flares, as it misses potentially important nonhydrodynamic effects.