make something make another thing thanks for any help, Martin Nadoll [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => Martin Nadoll [ip] => martin@nadoll.d [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 1 [islastshown] => [isfirstshown] => 1 [attachments] => [allattachments] => ) --> check, if a value is integer - Macromedia ColdFusion

check, if a value is integer - Macromedia ColdFusion

hello, how do i check, if a value is integer in cold fusion? <cfif myValue/4 isInteger> <!--- true if myValue is 4,8,12,16 and so on ---> make something <cfelse> <!--- if myValue is 1,2,3,5,6,7,9 and so on ---> make another thing </cfif> thanks for any help, Martin Nadoll...

  1. #1

    Default check, if a value is integer

    hello,

    how do i check, if a value is integer in cold fusion?

    <cfif myValue/4 isInteger> <!--- true if myValue is 4,8,12,16 and so on --->
    make something
    <cfelse> <!--- if myValue is 1,2,3,5,6,7,9 and so on --->
    make another thing
    </cfif>

    thanks for any help,
    Martin Nadoll


    Martin Nadoll Guest

  2. #2

    Default Re: check, if a value is integer

    You can determine if a number is an integer by performing:
    <CFIF (foo \ 2) * 2 IS foo>

    If the statement is true, you have an integer. However, you seem to be trying
    to discriminate between multiples of 4.
    You might want to do the following:
    <CFIF foo mod 4 IS 0>

    IF the statement is true, you have a multiple of 4.

    jdeline Guest

  3. #3

    Default Re: check, if a value is integer

    <cfif Number EQ Round(Number)>
    Number is integer
    <cfelse>
    Number is not integer
    </cfif>

    Mr Black Guest

Similar Threads

  1. Replies: 0
    Last Post: October 27th, 11:19 AM
  2. Replies: 0
    Last Post: October 27th, 11:13 AM
  3. check string rep's integer
    By sinister in forum PHP Development
    Replies: 7
    Last Post: November 24th, 09:27 AM
  4. HowTo check if my String is a Number (Integer) ?
    By Craig Deelsnyder in forum ASP.NET
    Replies: 0
    Last Post: July 27th, 11:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •