STRFORMAT examples

0 views
Skip to first unread message

John Bridges

unread,
Apr 28, 2008, 1:31:59 PM4/28/08
to after...@googlegroups.com
New build of AfterGRASP is up for download:

http://www.aftergrasp.com/download/agsetup_20080410.exe

----------------------------------------------------------------------------
Thu, 10 April 2008

Fixed bug in STRFORMATTIME not correctly handling time formats.

Simple test example of STRFORMATDATETIME:

drawclear red
color white
set texthtml on
text "<html><font color=white size=6>"
textln strformatdatetime("Short Date",@date,0)
textln strformatdatetime("Short Time",0,@time)
textln strformatdatetime("Long Date",@date,0)
textln strformatdatetime("Long Time",0,@time)
textln strformatdatetime("General",@date,@time)
textln strformatdatetime("HHmmss",0,@time)
textln strformatdatetime("yyyyMMdd",@date,0)
wait
exitnow


Simple test example of STRFORMATNUMBER:

windowsize 1000 700
drawclear red
color white
set texthtml on
text "<html><font color=white size=5>"
set texthtml off
testformat "General"
testformat "#"
testformat "#.#;[red]#.#"
testformat ".#"
testformat "#.##"
testformat "#.####"
testformat "000.0000"
testformat "000,000"
testformat "#,000"
wait
exitnow

testformat:
declare formatstr

text @quote$@formatstr$@quote
textln 400 @textposy " -1234.567 "$strformatnumber(@formatstr, -1234.567)
text @quote$@formatstr$@quote
textln 400 @textposy " 99.8 "$strformatnumber(@formatstr, 99.8)
return


----------------------------------------------------------------------------

Reply all
Reply to author
Forward
0 new messages