Logic of Menu Programs

Discussions about CSEntry
Post Reply
Nikola
Posts: 27
Joined: December 24th, 2021, 4:30 am

Logic of Menu Programs

Post by Nikola »

I am trying to understand the logic of Menu Programs.
What is the meaning of [1:1], [2:2], [4:3], [7:1], and [8:3]?

filewrite(pffFile,"[Parameters]");
filewrite(pffFile,"PROVINCE=%s", CHOOSE_HOUSEHOLD[1:1]);
filewrite(pffFile,"DISTRICT=%s", CHOOSE_HOUSEHOLD[2:2]);
filewrite(pffFile,"ENUMERATION_AREA=%s", CHOOSE_HOUSEHOLD[4:3]);
filewrite(pffFile,"AREA_TYPE=%s", CHOOSE_HOUSEHOLD[7:1]);
filewrite(pffFile,"HOUSEHOLD_NUMBER=%s", CHOOSE_HOUSEHOLD[8:3]);
sherrell
Posts: 400
Joined: April 2nd, 2014, 9:16 pm
Location: Washington, DC

Re: Logic of Menu Programs

Post by sherrell »

It's a way to parse strings. The entire ID is contained in the CHOOSE_HOUSEHOLD variable, so looking at the subpieces of it yields the province, district, etc. variable values.

https://www.csprousers.org/help/CSPro/s ... sions.html

Also, I think you are using an older version of CSPro? For we introduced the PFF object in 7.3. I think you were looking at this menu application:

C:\Users\<UID>\Documents\CSPro\Examples 7.6\1 - Data Entry\Labor Force Survey\Menu\Menu.ent

which has now been updated to use the pff object.
Nikola
Posts: 27
Joined: December 24th, 2021, 4:30 am

Re: Logic of Menu Programs

Post by Nikola »

Thank you sherrell. I think I referred to old version documents.
Post Reply