An explicit expression is derived for the scattering function of a self-avoiding polymer chain in a $d$-dimensional space. The effect of strength of segment interactions on the shape of the scattering function and the radius of gyration of the chain is studied numerically. Good agreement is demonstrated between experimental data on dilute solutions of several polymers and results of numerical simulation.