Connexion rapide:  

Forum: VirtualDJ Technical Support

Sujet Casting - some of VDJScript "param_cast" strangenesses
NicotuxHome userMember since 2014
Not related but strange too: when switching language in setting options :
once selected (or reset) language appears in combobox a tooltip with effects temporary appears

string conversions: time and date convert only first number (before punctuation or alpha)
get_playlist_time & param_cast & debug )==> Text: 05:20:56
get_playlist_time & param_cast ms & debug )==> Time: 5ms

get_browsed_song "file date" & param_cast & debug )==> Text: 2020/07/31
get_browsed_song "file date" & param_cast ms & debug )==> Time: 2020.00ms

percent does not convert as a parameter:
constant 50.25% & param_cast frac & debug )==> Percent 50.25% but displays "0.25"
constant 50.25% & param_cast int & debug )==> Int: 50
constant 50.25% & param_cast int_trunc & debug )==> Percent 50.25% but displays "50"

constant 0.5 & param_cast beats & debug )==> Val: 0.5 but displays "0.5 bt"
constant 0.5 & param_cast beats & param_cast relative & debug )==> Unknown but displays "0.5 bt"

constant 12 & param_1_x & param_cast & debug )==> Val: 12.0 but displays "0.08"
 

Posté Wed 25 Aug 21 @ 1:04 am
AdionPRO InfinityCTOMember since 2006
VDJScript does not have a date or time type, so date and time are indeed simply represented as text.
(And casting text to values it indeed simply parses the first numbers it sees)

Will fix the other ones.
 

Posté Wed 25 Aug 21 @ 9:25 am