Skip to main content

PCMSSetCost

Syntax

void PCMSSetCost (Trip trip, int cost)

Parameters

  • Trip trip – Handle to a trip.
  • int cost – The trip’s cost per mile in cents.

Description

Sets the trip’s cost per mile/kilometer.

Return Values

None

Sample Code

NewSection("PCMSSetCost, PCMSGetCost");

PCMSClearStops(trip);
PCMSAddStop(trip, HOME);
PCMSAddStop(trip, WORK);

int origCost = PCMSGetCost(trip);

PCMSSetCost(trip, 100);
ret = PCMSCalculate(trip);
TestErr(ret > 0, "PCMSCalculate(trip)");

Supported Since: PC*Miler Connect 12 Category: Trip Options

Last updated July 8, 2025.