  In the optically thin regime, the intensity ratio of the two Si IV resonance
lines (1394 and 1403 \AA\ ) are theoretically the same as the ratio of their
oscillator strengths, which is exactly 2. Here, we study the ratio of the
integrated intensity of the Si IV lines ($R=\int
I_{1394}(\lambda)\mathrm{d}\lambda/\int I_{1403}(\lambda)\mathrm{d}\lambda$)
and the ratio of intensity at each wavelength point
($r(\Delta\lambda)=I_{1394}(\Delta\lambda)/I_{1403}(\Delta\lambda)$) in two
solar flares observed by the Interface Region Imaging Spectrograph. We find
that at flare ribbons, the ratio $R$ ranges from 1.8 to 2.3 and would generally
decrease when the ribbons sweep across the slit position. Besides, the
distribution of $r(\Delta\lambda)$ shows a descending trend from the blue wing
to the red wing. In loop cases, the Si IV line presents a wide profile with a
central reversal. The ratio $R$ deviates little from 2, but the ratio
$r(\Delta\lambda)$ can vary from 1.3 near the line center to greater than 2 in
the line wings. Hence we conclude that in flare conditions, the ratio
$r(\Delta\lambda)$ varies across the line, due to the variation of the opacity
at the line center and line wings. We notice that, although the ratio
$r(\Delta\lambda)$ could present a value which deviates from 2 as a result of
the opacity effect near the line center, the ratio $R$ is still close to 2.
Therefore, caution should be taken when using the ratio of the integrated
intensity of the Si IV lines to diagnose the opacity effect.
