Changeset 2685 in kBuild for trunk/VSlickMacros
- Timestamp:
- Jul 4, 2013 7:50:01 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VSlickMacros/kdev.e
r2683 r2685 59 59 defeventtab default_keys 60 60 def 'C-S-A' = k_signature 61 def 'C-S-C' = k_javadoc_classbox 61 //def 'C-S-C' = k_javadoc_classbox 62 def 'C-S-C' = k_calc 62 63 def 'C-S-E' = k_box_exported 63 64 def 'C-S-F' = k_javadoc_funcbox … … 2946 2947 2947 2948 2949 /** 2950 * Command similar to the add() command in math.e, only this 2951 * produces hex and doesn't do the multi line stuff. 2952 */ 2953 _command int k_calc() 2954 { 2955 _str sLine; 2956 filter_init(); 2957 typeless rc = filter_get_string(sLine); 2958 if (rc == 0) 2959 { 2960 _str sResultHex; 2961 rc = eval_exp(sResultHex, sLine, 16); 2962 if (rc == 0) 2963 { 2964 _str sResultDec; 2965 rc = eval_exp(sResultDec, sLine, 10); 2966 if (rc == 0) 2967 { 2968 _end_select(); 2969 _insert_text(' = ' :+ sResultHex :+ ' (' :+ sResultDec :+ ')'); 2970 return 0; 2971 } 2972 } 2973 } 2974 2975 if (isinteger(rc)) 2976 message(get_message(rc)); 2977 else 2978 message(rc); 2979 return 1; 2980 } 2981 2982 2948 2983 2949 2984 /*******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.