Here is two ways to do this (Row() and Lag():
Names Default To Here(1);
dt = New Table("Untitled",
Add Rows(4),
Compress File When Saved(1),
New Column("Name", Character, "Nominal", Set Values({"David", "Bari", "James", "Lora"})),
New Column("Age", Numeric, "Continuous", Format("Best", 12), Set Values([23, 26, 12, 14])),
New Column("Con", Numeric, "Continuous", Format("Best", 12), Set Values([0, 1, 0, 0]))
);
dt << New Column("Younger than Next_Row", Character, "Nominal",
Formula(If(:Age > :Age[Row() + 1], "Yes", "No")));
dt << New Column("Younger than Next_Lag", Character, "Nominal",
Formula(If(:Age > Lag(:Age, -1), "Yes", "No"))
);
-Jarmo