Please read the articles Analyzing Data|Formula|… to learn FPScript.
Moreover there are different wizards (function wizard, object wizard, operator wizard, statement wizard, …) for the FPScript commands. These wizards are useful to learn the FPScript commands.
You should also read the article Efficient Data Analysis in the FlexPro Help. This article describes a FPScript example you find in the Examples.fpd database.