Sanmina ( SANM - Get Report) said latest-quarter profits were slightly better than expected on a cash basis despite a steep revenue decline. The company cut its earnings and revenue forecast for the current period.

The San Jose, Calif., electronics contractor said it earned 4 cents a share on a cash basis for the fiscal fourth quarter, above analysts' consensus forecast of 2 cents. Including items such as goodwill amortization, the company earned $3.6 million, or 1 cent a share, in the fourth quarter compared with earnings of $102 million, or 30 cents a share, last year. Revenue was $600 million compared with $1.4 billion a year ago.

For the current quarter, Sanmina expects to earn 3 cents or 4 cents a share on revenue that is the same as or slightly higher than the fourth quarter's. Analysts were predicting earnings of 5 cents a share for the first quarter.