  We give a constructive procedure to check basicness of open (or closed)
semialgebraic sets in a compact, non singular, real algebraic surface $X$. It
is rather clear that if a semialgebraic set $S$ can be separated from each
connected component of $X\setminus(S\cup\frz S)$ (when $\frz S$ stands for the
Zariski closure of $(\ol S\setminus{\rm Int}(S))\cap{\rm Reg}(X)$), then $S$ is
basic. This leads to associate to $S$ a finite family of sign distributions on
$X\setminus\frz S$; we prove the equivalence between basicness and two
properties of these distributions, which can be tested by an algorithm. There
is a close relation between these two properties and the behaviour of fans in
the algebraic functions field of $X$ associated to a real prime divisor, which
gives an easy proof, for a general surface $X$, of the well known 4-elements
fan's criterion for basicness (Brocker, Andradas-Ruiz). Furthermore, if the
criterion fails, using the description of fans in dimension 2, we find an
algorithmic method to exhibit the failure. Finally, exploiting this thecnics of
sign distribution we give one improvement of the 4-elements fan's criterion of
Brocker to check if a semialgebraic set is principal.
