[NTG-pdftex] \pdfretval vs. expandable \pdfstrcmp

Heiko Oberdiek oberdiek at uni-freiburg.de
Wed Jun 15 20:41:48 CEST 2005


Hello,

is there a reason why \pdfstrcmp is not expandable?
An expandable variant could be used in expandable contexts:
  \ifcase\numexpr\pdfstrcmp{StringA}{StringB}+1\relax
  ...\or ...\or ...\fi
Inserting into a sorted linear list could be done in O(n):
  \edef\mylist{\addtolist\mylist{foo}}%
Now it is O(n^2) :-(

Yours sincerely
  Heiko <oberdiek at uni-freiburg.de>
-- 


More information about the ntg-pdftex mailing list